//
// Amberol
//

playlistview {
  scrollbar {
    &.overlay-indicator {
      &.dragging,
      &.hovering { background-color: transparent; }
    }
  }

  queuerow {
    picture.cover,
    image.card { border: none; }
  }
}

//
// Theme Selectors
//

themeselector, // Gnome text editor
panelthemeselector { // Gnome builder
  margin: $base_padding * 1.5;

  checkbutton {
    padding: 0;
    min-height: 44px;
    min-width: 44px;
    padding: 1px;
    background-clip: content-box;
    border-radius: $circular_radius;
    box-shadow: inset 0 0 0 1px $border_color;

    &.follow:checked,
    &.light:checked,
    &.dark:checked {
      box-shadow: inset 0 0 0 2px $accent_bg_color;
    }

    &.follow {
      background-image: linear-gradient(to bottom right, #ffffff 50%, #202020 50%);
    }

    &.light {
      background-color: #ffffff;
    }

    &.dark {
      background-color: #202020;
    }

    &.theme-selector radio {
      -gtk-icon-source: none;
      border: none;
      box-shadow: none;
      min-height: 20px;
      min-width: 20px;
      padding: 0;

      &, &:hover, &:active, &:checked {
        background-color: transparent;
        background-image: none;
      }

      &:checked {
        -gtk-icon-size: 20px;
        -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/checkbox-checked-symbolic.svg")), -gtk-recolor(url("assets/checkbox-checked-symbolic@2.svg")));

        &, &:hover, &:active {
          color: $accent_fg_color;
          background-color: $accent_bg_color;
          box-shadow: 0 2px 3px -1px rgba(black, 0.08), 0 1px 2px 0 rgba(black, 0.1);
        }
      }
    }
  }
}

popover.menu themeswitcher { // Gnome console
  padding: $base_padding;

  .check {
    min-height: 20px;
    min-width: 20px;
    background: none;
    padding: 0;
    margin: 0;
    border-radius: $circular_radius;
    color: $accent_fg_color;
    background-color: $accent_bg_color;

    &, &:hover, &:active {
      box-shadow: 0 2px 3px -1px rgba(black, 0.08), 0 1px 2px 0 rgba(black, 0.1);
    }
  }

  checkbutton {
    padding: 0;
    min-height: 44px;
    min-width: 44px;
    padding: 1px;
    border: none;
    background-clip: content-box;
    border-radius: $circular_radius;
    box-shadow: inset 0 0 0 1px $border_color;

    &:checked {
      box-shadow: inset 0 0 0 2px $accent_color;
    }

    radio {
      padding: 0;
      border: none;

      &,
      &:hover,
      &:active,
      &:checked,
      &:indeterminate {
        background-color: transparent;
        background-image: none;
        box-shadow: none;
        color: transparent;
      }

      &:checked, &:indeterminate {
        -gtk-icon-source: none;
        -gtk-icon-size: 0;
      }
    }

    &.system {
      background: linear-gradient(-45deg, #1e1e1e 50%, white 50%);
    }

    &.light {
      color: gtkalpha(black, .8);
      background-color: white;
    }

    &.dark {
      color: white;
      background-color: #1e1e1e;
    }
  }
}

// Sticky note
styleselector {
  checkbutton {
    padding: 0;
    min-height: 44px;
    min-width: 44px;
    padding: 0;
    background-clip: content-box;
    border-radius: $circular_radius;
    box-shadow: none;
    border: none;

    &:hover {
      box-shadow: inset 0 0 0 2px $border_color;
    }

    &:checked {
      box-shadow: inset 0 0 0 2px var(--accent-bg-color);

      > radio, > radio:checked {
        &, &:hover {
          -gtk-icon-size: 20px;
          -gtk-icon-source: -gtk-scaled(-gtk-recolor(url("assets/checkbox-checked-symbolic.svg")), -gtk-recolor(url("assets/checkbox-checked-symbolic@2.svg")));
          color: var(--accent-fg-color);
          background-color: var(--accent-bg-color);
          box-shadow: 0 2px 3px -1px rgba(black, 0.08), 0 1px 2px 0 rgba(black, 0.1);
          border: none;
        }
      }
    }

    > radio {
      min-height: 20px;
      min-width: 20px;
      padding: 0;
      margin: 0;

      &:not(:checked):not(:indeterminate) {
        &, &:hover {
          color: transparent;
          border: none;
          background: none;
          box-shadow: none;
          -gtk-icon-source: none;
        }
      }
    }
  }
}

.note-window {
  &, .text-view.view, .text-view.view > text, .toolbar, .toolbar button { color: $accent_fg_color; }

  .top-bar > windowhandle:backdrop { filter: none; }

  popover {
    > arrow,
    > contents {
      @if $rimless == 'false' {
        border: 1px solid gtkalpha($accent_fg_color, 0.1);
        box-shadow: 0 1px 5px 1px transparentize(black, .91),
                    0 2px 14px 3px transparentize(black, .95);
      }
    }
  }

  &.style-yellow {
    &, .text-view.view, .text-view.view > text {
      background-color: var(--accent-yellow);
    }
  
    headerbar.flat, .toolbar {
      &, &:backdrop {
        background-color: var(--accent-yellow);
      }
    }

    .text-view.view > text > selection {
      background-color: gtkalpha($accent_fg_color, 0.35);
    }

    popover {
      > arrow,
      > contents {
        background-color: gtkmix($accent_fg_color, var(--accent-yellow), 10%);
      }
    }
  }

  &.style-pink {
    &, .text-view.view, .text-view.view > text {
      background-color: var(--accent-pink);
    }
  
    headerbar.flat, .toolbar {
      &, &:backdrop {
        background-color: var(--accent-pink);
      }
    }

    .text-view.view > text > selection {
      background-color: gtkalpha($accent_fg_color, 0.35);
    }

    popover {
      > arrow,
      > contents {
        background-color: gtkmix($accent_fg_color, var(--accent-pink), 10%);
      }
    }
  }

  &.style-green {
    &, .text-view.view, .text-view.view > text {
      background-color: var(--accent-green);
    }
  
    headerbar.flat, .toolbar {
      &, &:backdrop {
        background-color: var(--accent-green);
      }
    }

    .text-view.view > text > selection {
      background-color: gtkalpha($accent_fg_color, 0.35);
    }

    popover {
      > arrow,
      > contents {
        background-color: gtkmix($accent_fg_color, var(--accent-green), 10%);
      }
    }
  }

  &.style-purple {
    &, .text-view.view, .text-view.view > text {
      background-color: var(--accent-purple);
    }
  
    headerbar.flat, .toolbar {
      &, &:backdrop {
        background-color: var(--accent-purple);
      }
    }

    .text-view.view > text > selection {
      background-color: gtkalpha($accent_fg_color, 0.35);
    }

    popover {
      > arrow,
      > contents {
        background-color: gtkmix($accent_fg_color, var(--accent-purple), 10%);
      }
    }
  }

  &.style-blue {
    &, .text-view.view, .text-view.view > text {
      background-color: var(--accent-blue);
    }
  
    headerbar.flat, .toolbar {
      &, &:backdrop {
        background-color: var(--accent-blue);
      }
    }

    .text-view.view > text > selection {
      background-color: gtkalpha($accent_fg_color, 0.35);
    }

    popover {
      > arrow,
      > contents {
        background-color: gtkmix($accent_fg_color, var(--accent-blue), 10%);
      }
    }
  }

  &.style-gray {
    &, .text-view.view, .text-view.view > text {
      background-color: #565656;
    }
  
    headerbar.flat, .toolbar {
      &, &:backdrop {
        background-color: #565656;
      }
    }

    .text-view.view > text > selection {
      background-color: gtkalpha($accent_fg_color, 0.35);
    }

    popover {
      > arrow,
      > contents {
        background-color: gtkmix($accent_fg_color, #565656, 10%);
      }
    }
  }

  &.style-charcoal {
    &, .text-view.view, .text-view.view > text {
      background-color: #2b2b2b;
    }
  
    headerbar.flat, .toolbar {
      &, &:backdrop {
        background-color: #2b2b2b;
      }
    }

    .text-view.view > text > selection {
      background-color: gtkalpha($accent_fg_color, 0.35);
    }

    popover {
      > arrow,
      > contents {
        background-color: gtkmix($accent_fg_color, #2b2b2b, 10%);
      }
    }
  }
}

//
// NG (DING)
//

window#desktopwindow.background {
  background: none;
}
