/* File: a1_portal/assets/css/a1-icon-states.css
   Sizes and states for the Soft 3D icons that a1-icons.css puts in place of Font Awesome glyphs.
   The icon box is 1.2em, so the drawing is as tall as the glyph it replaces, and a negative margin cancels the extra
   size, so an icon never moves its neighbours. The top bar uses one fixed size instead (--a1-ic-header). */
:root {
  --a1-ic-header: var(--a1-icon-header); /* every icon in the top bar, inside a 38 px icon card like the page toolbar's */
  --a1-ic-plate: linear-gradient(180deg, #fff, #f6eeff);
  --a1-ic-plate-edge: #ded3eb;
  --a1-ic-plate-lit: #fff;
  --a1-ic-shade: rgba(0, 0, 0, 0.3);
  --a1-ic-plate-shade: #e5dcf0;
  --a1-ic-plate-shadow: rgba(73, 40, 110, 0.5);
}

/* The top bar: every control is the same icon card as the page toolbar's buttons (.a1-ph-ib in a1-sitewide.css: 38 px,
   the button face, the firm edge, the bevel, the ring on hover), with one icon size inside, centred on the bar's centre
   line, so the header row matches the toolbar row under it (Nov 7, 2026). The platform gave its icons different sizes
   (fa-lg on some, 16 to 22 px on others) and Add a round chip; all of that is reset here. The unread count is positioned
   absolutely, so it never moves an icon. */
/* Bootstrap's clearfix pseudo-elements become empty flex items in the flex row and add a second gap after Search. */
#header .navbar-nav.navbar-right::before,
#header .navbar-nav.navbar-right::after { display: none; }
#header .navbar-nav > li:is(.icon, .a1-search, .a1-panel-icon, .header-notifications, .a1-quick-add) {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
#header .navbar-nav > li:is(.icon, .a1-search, .a1-panel-icon, .header-notifications, .a1-quick-add) > :is(a, button) {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  height: 38px !important;
  padding: 0 !important;
  margin: 0;
  border: 0;
  border-radius: 10px 4px;
  background: var(--a1-button-face);
  box-shadow: inset 0 0 0 1px var(--a1-border-strong), var(--a1-button-bevel);
  font-size: var(--a1-ic-header);
  transition: box-shadow 0.25s ease, transform 0.2s ease, background 0.25s ease;
}
#header .navbar-nav > li:is(.icon, .a1-search, .a1-panel-icon, .header-notifications, .a1-quick-add) > :is(a, button):is(:hover, :focus-visible, [aria-expanded="true"]) {
  background: var(--a1-button-face);
  box-shadow: inset 0 0 0 1px var(--a1-lavender-deep), 0 0 0 3px var(--a1-button-ring);
  transform: translateY(-1px);
}
/* A running timer (a1-session.js sets a1-live-on from the Timer panel's count): the card takes the rose face and the
   red edge, the drawn clock is turned from lavender to red, and a soft red glow breathes slowly. With reduced motion
   the glow stays still. */
@keyframes a1-timer-live-glow {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
#header .navbar-nav > li.a1-panel-icon.a1-live-on > :is(a, button),
#header .navbar-nav > li.a1-panel-icon.a1-live-on > :is(a, button):is(:hover, :focus-visible, [aria-expanded="true"]) {
  background: linear-gradient(180deg, #fff, var(--a1-rose));
  box-shadow: inset 0 0 0 1.5px var(--a1-negative), 0 0 5px 0 color-mix(in srgb, var(--a1-negative) 28%, transparent);
}
/* The brighter glow is an ::after halo that fades in and out, so only opacity changes per frame. */
#header .navbar-nav > li.a1-panel-icon.a1-live-on > :is(a, button)::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: 0 0 10px 2px color-mix(in srgb, var(--a1-negative) 35%, transparent);
  opacity: 0;
  pointer-events: none;
  animation: a1-timer-live-glow 3.6s ease-in-out infinite;
}
#header .navbar-nav > li.a1-panel-icon.a1-live-on > :is(a, button) [class*="fa-"]:not(.a1-icon-flat)::before {
  filter: hue-rotate(100deg) saturate(1.6) brightness(0.92);
}
@media (prefers-reduced-motion: reduce) {
  #header .navbar-nav > li.a1-panel-icon.a1-live-on > :is(a, button)::after { animation: none; }
}
/* The avatar is a round card of the same height. */
#header .navbar-nav > li > .a1-user-btn { width: 38px; height: 38px; }
/* The unread count: a small gold figure inside the card's top-right corner, so it never reaches the next card in the
   row (Nov 8, 2026; the layout check's header-badge rule fails when it does). */
#header .navbar-nav > li > :is(a, button) :is(.badge, span[class*="tw-absolute"]) {
  position: absolute;
  top: 1px !important;
  right: 1px !important;
  left: auto !important;
  /* The platform's own classes set an 18 pixel minimum, so the size is forced here. */
  min-width: var(--a1-count-size) !important;
  min-height: 0 !important;
  height: var(--a1-count-size) !important;
  box-sizing: border-box;
  padding: var(--a1-count-pad) !important;
  border-radius: 4px !important;
  background: var(--a1-count-face) !important;
  color: var(--a1-gold-ink) !important;
  font: 700 var(--a1-count-font)/var(--a1-count-size) var(--a1-ui-font) !important;
  font-variant-numeric: tabular-nums;
  text-align: center;
  box-shadow: var(--a1-count-glow) !important;
}
#header .navbar-nav > li > :is(a, button) span:has(> [class*="fa-"]) {
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  background: none !important;
  box-shadow: none !important;
  font-size: inherit;
}
#header .navbar-nav > li > :is(a, button) [class*="fa-"]:not(.a1-icon-flat) {
  display: block;
  width: var(--a1-ic-header);
  height: var(--a1-ic-header);
  margin: 0;
  font-size: var(--a1-ic-header) !important;
  line-height: 1;
  vertical-align: top;
  --a1-ic-box: var(--a1-ic-header);
}
#header .navbar-nav > li > :is(a, button) [class*="fa-"]:not(.a1-icon-flat)::before {
  filter: none; /* the platform paints Add's span in the primary colour, and the silhouette rule (a1-icons.css) made its plus white */
  display: block;
  margin: 0;
}

/* Hover: the icon rises by two pixels with an eased move. `translate` is separate from `transform`, so rotated arrows keep their turn. */
:is(a, button, .btn, [role="button"], [role="tab"]):not(:disabled, [aria-disabled="true"], .disabled):is(:hover, :focus-visible) > :is(.fa, .fas, .far, .fab, [class*="fa-"])::before {
  translate: 0 -2px;
}
:is(.fa, .fas, .far, [class*="fa-"])::before {
  transition: translate 0.25s ease, opacity 0.25s ease;
}

/* Unavailable: the icon turns grey and keeps its full strength, because the control itself is faded once
   (--a1-disabled-opacity in a1-sitewide.css). Fading the icon as well left a trash icon at a fifth of its strength, nearly
   invisible (the Courts table, Nov 23, 2026). The grey also replaces the tinted and silhouette filters of coloured faces.
   The control's tooltip names what unlocks it. */
:is(:disabled, [aria-disabled="true"], .disabled, .is-unavailable) > :is(.fa, .fas, .far, [class*="fa-"])::before {
  filter: grayscale(1) contrast(0.9) !important;
  opacity: 1;
}

/* Active item: the icon sits on a raised, bevelled plate. Add the class a1-ic-plate to any icon, or use the active
   states of the rail, the top bar and tab bars below. */
.a1-ic-plate,
#menu.sidebar li.active > a > .menu-icon,
#menu.sidebar li > a.active > .menu-icon,
#header .navbar-nav > li.active > a > :is(.fa, .fas, .far, [class*="fa-"]),
.nav-tabs > li.active > a > :is(.fa, .fas, .far, [class*="fa-"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5em;
  min-height: 1.4em;
  border-radius: 0.6em 0.25em;
  background: var(--a1-ic-plate);
  box-shadow: inset 0 1px 0 var(--a1-ic-plate-lit), inset 0 -2px 0 var(--a1-ic-plate-shade), 0 0 0 1px var(--a1-ic-plate-edge), 0 6px 12px -8px var(--a1-ic-plate-shadow);
  transition: box-shadow 0.35s ease, background 0.35s ease;
}

/* Status dots, stars and squares stay Font Awesome glyphs, because they take the colour of the text and their solid or
   outline form carries meaning. A shade on the lower edge makes them match the Soft 3D icons beside them. */
:is(.fa-circle, .fa-star, .fa-square, .fa-circle-dot, .fa-dot-circle):not(.a1-icon-flat)::before {
  background: linear-gradient(160deg, transparent 52%, var(--a1-ic-shade)),
    linear-gradient(currentColor, currentColor);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  :is(.fa, .fas, .far, [class*="fa-"])::before { transition: none !important; }
  :is(a, button, .btn, [role="button"], [role="tab"]):is(:hover, :focus-visible) > [class*="fa-"]::before { translate: none !important; }
}
