/*
  Zweck: Desktop-Footer der Kommandozentrale (Chips, Statusband-Ausrichtung).
  Zielpfad: /home/mckiede/public_html/design/layout-desktop-footer.css
  Verantwortlich: mckie-Portal
  Abhängigkeit: layout-desktop.css (vorher); Ladereihenfolge über index.html.
*/

/*
  Footer chip row (desktop)
  -----------------------
  Shared height via --footer-chip-height keeps violet site, orange status,
  black clock and impressum aligned. Status text lives in the left orange band
  (#console-status-feed); the decorative right orange segment is ::after.
  Mobile overrides: layout-mobile.css + system-activity.css
*/
.command-footer {
  --footer-chip-height: 2.15rem;
  position: relative;
  display: flex;
  gap: var(--gap);
  justify-content: space-between;
  align-items: stretch;
  min-height: var(--footer-chip-height);
  margin-top: var(--gap);
  padding: 0;
  border-radius: 0;
  clip-path: none;
  font-weight: 900;
  text-transform: uppercase;
}

.command-footer .footer-chip,
.command-footer .footer-button,
.command-footer::after {
  box-sizing: border-box;
  min-height: var(--footer-chip-height);
  height: var(--footer-chip-height);
  align-self: stretch;
}

.command-footer::before,
.command-footer::after {
  content: "";
  display: block;
  flex: 1 1 8rem;
  min-width: 4rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(90deg, var(--console-frame), color-mix(in srgb, var(--console-frame) 72%, transparent));
}

.command-footer::before {
  display: none;
}

.command-footer::after {
  order: 4;
}

.footer-frame-svg {
  display: none;
}

.command-footer > :not(.console-svg),
.side-rail > :not(.console-svg) {
  position: relative;
  z-index: 1;
}

.footer-chip--site {
  order: 1;
  display: grid;
  place-items: center;
  min-width: 10rem;
  padding-inline: 1rem;
  border-radius: var(--radius-pill);
  background: var(--violet);
  color: var(--black);
}

.footer-chip--clock {
  order: 3;
  display: inline-flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  min-width: 14rem;
  padding-inline: 1.2rem;
  border-radius: var(--radius-pill);
  background: var(--black);
  color: var(--peach);
}

.footer-chip--clock .clock-date,
.footer-chip--clock .clock-time {
  white-space: nowrap;
  line-height: 1;
}

.command-footer .footer-button {
  order: 5;
  flex: 0 0 auto;
  min-width: 8.5rem;
  border-radius: var(--radius-pill);
  background: var(--violet);
  color: var(--black);
  box-shadow: none;
}

.command-footer .footer-button::before {
  display: none;
}

.command-footer .footer-button:hover,
.command-footer .footer-button:focus-visible {
  background: color-mix(in srgb, var(--violet) 86%, white);
}

/*
  Footer aligned with command-layout columns (desktop only).
  Flex + nowrap keeps status, clock and orange ::after on one row (grid + ::after broke to two rows).
*/
@media (min-width: 1181px) {
  .command-footer {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: var(--gap);
  }

  .footer-chip--site {
    order: 1;
    flex: 0 0 var(--side-rail-width);
    width: var(--side-rail-width);
    min-width: 0;
    max-width: none;
  }

  #console-status-feed.footer-status-band {
    order: 2;
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }

  .footer-chip--clock {
    order: 3;
    flex: 0 0 auto;
  }

  .command-footer::after {
    order: 4;
    display: block;
    flex: 1 1 4rem;
    min-width: 4rem;
  }

  .command-footer .footer-button {
    order: 5;
    flex: 0 0 var(--module-rail-width);
    width: var(--module-rail-width);
    min-width: 0;
    max-width: none;
  }
}

/* Module-Toggle: nur #module-buttons ausblenden, Rail bleibt (Impressum/Footer stabil). */
.page-shell.is-module-buttons-hidden .module-rail .module-buttons {
  display: none !important;
}

.page-shell.is-module-buttons-hidden .module-rail-header .system-label,
.page-shell.is-module-buttons-hidden .module-rail-header h2 {
  color: color-mix(in srgb, var(--red) 88%, var(--muted));
}

@media (min-width: 1181px) {
  /* Nur Farbe tauschen — gleiche Deckkraft wie aktiv (--segment-muted = 28 %). */
  .page-shell.is-module-buttons-hidden .module-rail {
    border-color: var(--red);
    box-shadow:
      inset 0.42rem 0 0 rgb(214 106 106 / 28%),
      var(--shadow);
  }
}
