/* Top Bar */
// a.k.a. the panel

#panel {
  background-color: $panel;
  font-weight: bold;
  height: $item_size;
  color: $panel-text-secondary;
  font-feature-settings: "tnum";
  transition-duration: 250ms;
  @include fontsize($font_size - 1);

  // the rounded outset corners
  .panel-corner {
    -panel-corner-radius: 0;
    -panel-corner-background-color: $panel;
    -panel-corner-border-width: 2px;
    -panel-corner-border-color: transparent;
    -panel-corner-opacity: 1;
    transition-duration: 250ms;
  }

  // panel menus
  .panel-button {
    -natural-hpadding: 12px;
    -minimum-hpadding: 6px;
    font-weight: bold;
    color: $panel-text-secondary;
    transition-duration: 150ms;
    border-radius: $circular_radius;
    text-shadow: none;
    border: 2px solid transparent;

    &.clock-display {
      .clock {
        transition-duration: 150ms;
        border: 2px solid transparent;
        border-radius: $circular_radius;
      }
    }

    &:hover {
      color: $panel-text;
      background-color: transparent;
      box-shadow: inset 0 0 0 1000px overlay($panel, hover);

      &.clock-display {
        box-shadow: none;
        color: $panel-text-secondary;

        .clock {
          color: $panel-text;
          box-shadow: inset 0 0 0 1000px overlay($panel, hover);
        }
      }
    }

    &:active, &:overview, &:focus, &:checked {
      &, &:hover {
        background-color: transparent;
        color: $panel-text;
        box-shadow: inset 0 0 0 1000px overlay($panel, active);
      }

      &.clock-display {
        box-shadow: none;
        color: $panel-text-secondary;

        .clock {
          box-shadow: inset 0 0 0 1000px overlay($panel, active);
          color: $panel-text;
        }
      }
    }

    .unlock-screen &,
    .login-screen &,
    .lock-screen & {
      color: $panel-text;

      &:focus, &:hover, &:active { color: $panel-text; }
    }

    // status area icons
    .system-status-icon {
      icon-size: $base_icon_size;
      padding: $base_padding - 1px;
      margin: 0 $base_margin;
      -st-icon-style: symbolic;
    }

    .panel-status-indicators-box .system-status-icon,
    .panel-status-menu-box .system-status-icon {
      margin: 0;
    }

    // app menu icon
    .app-menu-icon {
      -st-icon-style: symbolic;
      // dimensions of the icon are hardcoded
    }

    &#panelActivities {
      -natural-hpadding: $base_padding * 3;
    }
  }

  // transparent panel on lock & login screens
  &:overview,
  &.unlock-screen,
  &.login-screen,
  &.lock-screen {
    background-color: transparent;
    box-shadow: none;

    StLabel, StIcon { color: on(dark, secondary); }

    .panel-button {
      &:hover {
        color: on(dark);
        background-color: transparent;
        box-shadow: inset 0 0 0 1000px overlay(dark, hover);

        &.clock-display {
          box-shadow: none;
          color: on(dark);

          .clock {
            color: on(dark);
            box-shadow: inset 0 0 0 1000px overlay(dark, hover);
          }
        }
      }

      &:active, &:overview, &:focus, &:checked {
        color: on(dark);
        background-color: transparent;
        box-shadow: inset 0 0 0 1000px overlay(dark, active);

        &.clock-display {
          box-shadow: none;
          color: on(dark);

          .clock {
            box-shadow: inset 0 0 0 1000px overlay(dark, active);
            color: on(dark);
          }
        }
      }
    }

    .panel-corner {
      -panel-corner-radius: 0;
      -panel-corner-background-color: transparent;
      -panel-corner-border-color: transparent;
    }
  }

  .panel-status-indicators-box,
  .panel-status-menu-box {
    spacing: 2px;
  }

  // spacing between power icon and (optional) percentage label
  .power-status.panel-status-indicators-box {
    spacing: 0;
  }

  // indicator for active
  .screencast-indicator,
  .remote-access-indicator { color: $warning; }
}
