/* Top-level window frame */
.window-frame {
  background: black;
  color: white;
  padding: 15px;
  border-radius: 0;
  border: none;
}

/* Force headerbar styling for modal windows */
.window-frame.modal headerbar,
.window-frame.modal headerbar:backdrop {
  background: transparent;
  color: white;
  border: none;
  box-shadow: none;
}

/* Modal close button */
.window-frame.modal headerbar windowcontrols button,
.window-frame.modal headerbar windowcontrols button:hover,
.window-frame.modal headerbar windowcontrols button:active {
  background: transparent;
  background-image: none;
  box-shadow: none;
  border: none;
  padding-right: 0;
  border-radius: 0;
}

.window-frame.modal headerbar windowcontrols button > image {
  background: transparent;
  border-radius: 0;
}

.window-frame.modal headerbar windowcontrols button:hover > image {
  background: #303030;
  border-radius: 5px;
}

/* Modal window frame */
.window-frame.modal {
  padding-top: 0;
  border-radius: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Modal content needs matching top border-radius */
.window-frame.modal .window-content {
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* Top-level window content */
.window-content {
  padding: 15px;
  border: 2px solid #800000;
  border-radius: 20px;
}

/* Title of the window */
.window-title {
  font-size: large;
}

/* Links */
.linktext {
  color: #89CFF0;
}

/* Label above controls-content */
.controls-label {
  font-size: smaller;
  margin-top: -4px;
}

/* controls-content boxes */
.controls-content {
  background: #141414;
  padding: 10px;
  border: 1px solid #a00000;
  border-radius: 5px;
  color: #d0d0d0;
}

/* Tighten up routing groups and make the background a little lighter */
.window-routing .controls-content {
  background: #181818;
  padding: 5px;
}

/* Used when the controls content is at the top level */
.top-level-content {
  background: #141414;
}

.route-label {
  font-size: smaller;
  border-radius: 3px;
}

.route-label-hover {
  background: #801010;
  outline: 2px solid #801010;
}

.route-label:drop(active) {
  box-shadow: none;
  background: #801010;
}

/* Suppress GTK default drop highlight on routing overlay */
.window-routing:drop(active) {
  box-shadow: none;
  outline: none;
  background: transparent;
}

.mixer-corner-label {
  font-size: smaller;
  color: #808080;
}

.mixer-label-hover {
  font-weight: bold;
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.filter-stage-hover {
  background: #282828;
  border-radius: 5px;
}

.filter-stage checkbutton {
  padding: 0;
}

.presets-button {
  font-size: smaller;
  padding: 0 6px;
}

.dsp-section-header {
  font-size: 1.2em;
  font-weight: bold;
  color: #c0c0c0;
  padding-left: 5px;
}

label.gain {
  font-size: smaller;
}

/* Default button style */
.window-frame button {
  border: 1px solid #303030;
  background: linear-gradient(175deg, #202020, #282828);
  box-shadow: none;
  font-weight: bold;
  color: #ffffff;
}

.window-frame button.toggle {
  color: #808080;
}

.window-frame button:focus:focus-visible {
  outline: 2px solid #801010;
}

/* padding doesn't work when selected with .window-frame, so use
 * .toggle instead
 */
button.toggle {
  padding: 0px 5px 0px 5px;
}

.window-frame button:checked {
  color: #ffffff;
  border: 1px solid #404040;
}

.window-frame button:hover {
  background: #303030;
}

.window-frame button:disabled {
  background: #202020;
  color: #505050;
}

/* Stop text shadows on buttons from being applied to the popup menu */
.window-frame button > label > * {
  text-shadow: none;
}

/* Button controls that are always disabled because they indicate status */
.window-frame button.fixed {
  color: #ffffff;
  filter: none;
}

.window-frame button.fixed label {
  color: #ffffff;
  filter: none;
}

/* Combobox controls that are always disabled because they indicate status */
.window-frame combobox.fixed > box > button {
  color: #ffffff;
}

/* Buttons that glow when on */
.window-frame button.sync-status {
  text-shadow: 0 0 5px #a00000, 0 0 15px #800000;
}

.window-frame button.sync-status:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.input-select:checked {
  color: #ffffff;
  text-shadow: 0 0 5px #00ff00, 0 0 10px #00ff00, 0 0 15px #00ff00;
  filter: none;
}

.window-frame button.input-link:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.autogain:checked {
  text-shadow: 0 0 5px #0000ff, 0 0 15px #0000ff;
}

.window-frame button.speaker-switching-enable:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.speaker-switching-alt {
  color: #ffffff;
  text-shadow: 0 0 5px #00ff00, 0 0 15px #00c000;
}

.window-frame button.speaker-switching-alt:checked {
  text-shadow: 0 0 5px #ff0000, 0 0 15px #c00000;
}

.window-frame button.talkback-enable:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.talk:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

/* orange */
.window-frame .vocaster button.autogain:checked {
  text-shadow: 0 0 5px #ffc000, 0 0 15px #ffc000;
}

.window-frame button.safe:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.safe:checked:disabled {
  text-shadow: 0 0 5px #005000, 0 0 15px #005000;
}

.window-frame button.inst:checked {
  text-shadow: 0 0 5px #ff0000, 0 0 15px #ff0000;
}

.window-frame .gen4 button.inst:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame .gen4 button.inst:checked:disabled {
  text-shadow: 0 0 5px #005000, 0 0 15px #005000;
}

.window-frame button.pcm-input-mix:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

/* Air Checked (Gen 3) */
.window-frame button.air:checked {
  text-shadow: 0 0 5px #ffc000, 0 0 15px #ffc000;
}

/* Air Selections (Gen 4) */
.window-frame button.air.selected-presence > label {
  color: #ffffff;
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.air.selected-presencedrive > label {
  color: #ffffff;
  text-shadow: 0 0 5px #ffc000, 0 0 15px #ffc000;
}

.window-frame button.air.selected-presence:disabled > label {
  color: #505050;
  text-shadow: 0 0 5px #005000, 0 0 15px #005000;
}

.window-frame button.air.selected-presencedrive:disabled > label {
  color: #505050;
  text-shadow: 0 0 5px #503c00, 0 0 15px #503c00;
}

.window-frame button.pad:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.gain-switch:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.phantom:checked {
  text-shadow: 0 0 5px #ff0000, 0 0 15px #c00000;
}

.window-frame .gen4 button.phantom:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame .gen4 button.phantom:checked:disabled {
  text-shadow: 0 0 5px #005000, 0 0 15px #005000;
}

.window-frame button.input-mute:checked {
  text-shadow: 0 0 5px #ff0000, 0 0 15px #c00000;
}

.window-frame button.dsp:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

/* Direct Monitor Checked (Solo) */
.window-frame .direct-monitor:checked {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

/* Direct Monitor Selections (2i2) */
.window-frame button.direct-monitor.selected-mono > label {
  color: #ffffff;
  text-shadow: 0 0 5px #c0c0c0, 0 0 15px #c0c0c0;
}

.window-frame button.direct-monitor.selected-stereo > label {
  color: #ffffff;
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

/* Sample Rates */
.window-frame button.sample-rate.sample-rate-44100 {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.sample-rate.sample-rate-48000 {
  text-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
}

.window-frame button.sample-rate.sample-rate-88200 {
  text-shadow: 0 0 5px #ff8000, 0 0 15px #ff8000;
}

.window-frame button.sample-rate.sample-rate-96000 {
  text-shadow: 0 0 5px #ff8000, 0 0 15px #ff8000;
}

.window-frame button.sample-rate.sample-rate-176400 {
  text-shadow: 0 0 5px #ff0000, 0 0 15px #c00000;
}

.window-frame button.sample-rate.sample-rate-192000 {
  text-shadow: 0 0 5px #ff0000, 0 0 15px #c00000;
}

.window-frame button.sample-rate.inactive > label {
  color: #808080;
}

/* Button controls where checked is dimmer */

/* Mute button */
.window-frame button.mute {
  color: #ffffff;
  -gtk-icon-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
  border-color: #404040;
}

.window-frame button.mute:checked {
  -gtk-icon-shadow: 0 0 5px #ff0000, 0 0 15px #c00000;
  border-color: #303030;
}

/* Dim button */
.window-frame button.dim {
  color: #ffffff;
  -gtk-icon-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
  border-color: #404040;
}

.window-frame button.dim:checked {
  -gtk-icon-shadow: 0 0 5px #ffc000, 0 0 15px #ffc000;
  border-color: #303030;
}

/* SW/HW button */
.window-frame button.sw-hw {
  color: #ffffff;
  -gtk-icon-shadow: 0 0 5px #00c000, 0 0 15px #00c000;
  border-color: #404040;
}

.window-frame button.sw-hw:checked {
  color: #808080;
  -gtk-icon-shadow: 0 0 5px #ffc000, 0 0 15px #ffc000;
  border-color: #303030;
}

/* Textview used for long descriptions in the startup window */
.window-frame textview {
  color: #fefefe;
  background: none;
}
.window-frame textview > text {
  background: none;
}

/* Bigger buttons in the startup window */
.window-frame .window-startup button {
  padding: 5px;
}

/* Switches */
.window-frame switch {
  background: #303030;
  border: 1px solid #404040;
}

.window-frame switch:checked {
  background: #a00000;
  border-color: #c00000;
}

.window-frame switch slider {
  background: #d0d0d0;
  border: 1px solid #801010;
}

.window-frame switch:focus:focus-visible {
  outline: 2px solid #801010;
}

/* Separators */
.window-frame separator {
  background: #800000;
}

.window-frame .big-padding {
  padding: 50px;
}

/* Bigger buttons in confirmation dialogs */
.window-frame .big-padding button {
  padding: 5px 30px;
}

/* Notebook styling */
.window-frame notebook {
  border: none;
}

.window-frame notebook > header {
  background: none;
  border-bottom: 1px solid #a00000;
}

.window-frame notebook > header > tabs > tab {
  background: #181818;
  color: #808080;
  border: 1px solid #404040;
  border-bottom: none;
  padding: 8px 16px;
  margin: 2px;
  border-radius: 5px 5px 0 0;
}

.window-frame notebook > header > tabs > tab:checked {
  background: #141414;
  color: #ffffff;
  border: 1px solid #a00000;
  border-bottom: 1px solid #141414;
  outline: none;
  box-shadow: inset 0px -3px #c00000;
}

.window-frame notebook > header > tabs > tab:hover {
  background: #282828;
  box-shadow: inset 0px -3px #ffffff;
}

.window-frame notebook > header > tabs > tab:focus {
  outline: none;
}

.window-frame notebook > header > tabs > tab:focus-visible {
  outline: none;
}

.window-frame notebook > stack {
  background: #141414;
  border: 1px solid #a00000;
  border-radius: 5px;
  color: #d0d0d0;
}

.window-frame notebook.outer-notebook > stack {
  background: transparent;
  border: none;
  padding: 0;
}

/* Popover styling */
.window-frame popover.background {
  background-color: transparent;
}

.window-frame popover > arrow,
.window-frame popover > contents {
  background-color: #282828;
  color: #d0d0d0;
  border: 1px solid #a00000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.window-frame popover > contents {
  padding: 8px;
  border-radius: 8px;
}

/* Popover list item styling */
.window-frame popover row:hover {
  background-color: #800000;
  outline: none;
}

.window-frame popover row:focus {
  background-color: #800000;
  outline: none;
}

.window-frame popover row:selected {
  background-color: #800000;
  outline: none;
}

/* Popover checkmark images */
.window-frame popover row image {
  color: #d0d0d0;
}

.window-frame popover row:hover image {
  color: #ffffff;
}

/* Configuration window checkboxes */
.window-frame check {
  min-width: 14px;
  min-height: 14px;
  background: #202020;
  background-image: none;
  border: 1px solid #505050;
  box-shadow: none;
  color: #d0d0d0;
  -gtk-icon-source: none;
}

.window-frame check:checked {
  background: #c00000;
  border-color: #a00000;
  color: #ffffff;
  -gtk-icon-source: -gtk-icontheme("object-select-symbolic");
}

.window-frame check:indeterminate {
  background: #404040;
  border-color: #606060;
  -gtk-icon-source: -gtk-icontheme("list-remove-symbolic");
}

.window-frame check:hover {
  border-color: #a00000;
  outline: none;
}

.window-frame check:checked:hover {
  background: #e00000;
  border-color: #c00000;
}

.window-frame checkbutton:focus:focus-visible {
  outline: none;
}

.window-frame checkbutton:focus:focus-visible > check {
  outline: 2px solid #a00000;
  outline-offset: 1px;
}

/* Drop-down lists */
.drop-down-list,
.filter-type-list {
  background: transparent;
  color: #d0d0d0;
}

.drop-down-list > row,
.filter-type-list > row {
  padding: 4px 8px;
  color: #d0d0d0;
}

.drop-down-list > row:hover,
.filter-type-list > row:hover {
  background: #800000;
  color: #ffffff;
}

.drop-down-list > row:selected,
.filter-type-list > row:selected {
  background: #600000;
  color: #ffffff;
}

/* Mixer unavailable overlay */
.mixer-unavailable {
  font-size: 24px;
  font-weight: bold;
  color: #ff4040;
  background: rgba(0, 0, 0, 0.8);
  padding: 20px 40px;
  border-radius: 10px;
  border: 2px solid #ff0000;
}
