/**
 * Unity
 */

// Based on:
// https://bazaar.launchpad.net/~ubuntu-art-pkg/ubuntu-themes/trunk/view/head:/Ambiance/gtk-3.20/apps/unity.css

@use "../../../theme";
@use "../../../theme-color";
@use "../../../shadow";

// Decorations
UnityDecoration {
  -UnityDecoration-extents: 28px 0 0 0;
  -UnityDecoration-input-extents: 8px;

  -UnityDecoration-shadow-offset-x: 0;
  -UnityDecoration-shadow-offset-y: 3px;
  -UnityDecoration-active-shadow-color: rgba(black, .48);
  -UnityDecoration-active-shadow-radius: 18px;
  -UnityDecoration-inactive-shadow-color: rgba(black, .32);
  -UnityDecoration-inactive-shadow-radius: 6px;

  -UnityDecoration-glow-size: 8px;
  -UnityDecoration-glow-color: theme-color.$primary;

  -UnityDecoration-title-indent: 4px;
  -UnityDecoration-title-fade: 32px;
  -UnityDecoration-title-alignment: 0.0;

  .top {
    padding: 0 2px;
    border-style: none;
    border-radius: theme.$corner-radius theme.$corner-radius 0 0;
    box-shadow: inset 0 1px theme-color.highlight(theme-color.$titlebar);
    background-color: theme-color.$titlebar;
    color: theme-color.$on-titlebar;

    &:backdrop {
      background-color: theme-color.$titlebar-backdrop;
      color: theme-color.hint(theme-color.$on-titlebar);
    }
  }

  .left,
  .right {
  }

  .bottom {
  }

  .menuitem {
    border-radius: theme.$corner-radius theme.$corner-radius 0 0;
    box-shadow: none; // Don't inherit from .top
    color: theme-color.hint(theme-color.$on-titlebar);

    &:hover {
      background-color: theme-color.activated-overlay(theme-color.$on-titlebar);
      color: theme-color.$on-titlebar;
    }
  }
}

.background:not(.csd) headerbar:not(.titlebar) {
  border-radius: 0;
  box-shadow: shadow.$z1;

  &.inline-toolbar {
    border-style: none;
  }
}

sheet-style-dialog.unity-force-quit {
  // background-color: theme-color.$surface-z0;
}

// Panel Style
UnityPanelWidget,
.unity-panel {
  background-color: theme-color.$panel-solid;
  color: theme-color.$on-panel-solid;

  &:backdrop {
    color: theme-color.hint(theme-color.$on-panel-solid);
  }
}

.unity-panel.menubar,
.unity-panel .menubar {
}

.unity-panel.menuitem,
.unity-panel .menuitem {
  color: theme-color.hint(theme-color.$on-panel-solid);
}

.unity-panel.menubar.menuitem:hover,
.unity-panel.menubar .menuitem *:hover {
  background-color: theme-color.activated-overlay(theme-color.$on-panel-solid);
  color: theme-color.$on-panel-solid;
}

.menu IdoPlaybackMenuItem.menuitem:active {
  -gtk-icon-source: -gtk-icontheme('process-working-symbolic');
  animation: spin 1s linear infinite;
  color: theme-color.$primary;
}
