/* HSG Nachtrag 032 - einheitliche, sichtbare Interaktionselemente.
   Navigation bleibt semantisch ein Link; kein JavaScript, keine HTML-Umschreibung.
   Diese additive Datei wird als letztes globales Stylesheet geladen. */
:root {
  --hsg32-border: #c7ad86;
  --hsg32-border-hover: #95703d;
  --hsg32-paper: #fffdfa;
  --hsg32-paper-hover: #f4e9d8;
  --hsg32-ink: #593b16;
  --hsg32-focus: #53692c;
}

/* Fallback: auch bisher unformatierte Links sind unmittelbar als Aktion erkennbar.
   Bestehende grosse Karten, Kalenderchips und vollwertige CTA behalten ihr Design. */
.hsg-app :where(.hsg-panel a[href]:not(.hsg-link-card):not(.cal-day-link):not(.cal45-chip):not(.cal45-more):not(.hd-button):not(.cal45-button):not(.wh-button):not(.cal48-action-link):not(.staff21-self-button):not(.hsg31-action)) {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4em;
  max-width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--hsg32-border);
  border-radius: 10px;
  background: var(--hsg32-paper);
  color: var(--hsg32-ink);
  text-align: center;
  text-decoration: none;
  font-weight: 700;
  line-height: 1.35;
  vertical-align: middle;
  overflow-wrap: anywhere;
  transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease;
}
.hsg-app :where(.hsg-panel a[href]:not(.hsg-link-card):not(.cal-day-link):not(.cal45-chip):not(.cal45-more):not(.hd-button):not(.cal45-button):not(.wh-button):not(.cal48-action-link):not(.staff21-self-button):not(.hsg31-action)):hover {
  background: var(--hsg32-paper-hover);
  border-color: var(--hsg32-border-hover);
  color: #492e0c;
  box-shadow: 0 2px 7px rgba(64,43,21,.09);
}

/* Bisher unterstrichene Textaktionen: uebersteuern lokale Textlink-Dekoration.
   Beispiel: "Oeffnen", "Zuruecksetzen", "Weiter", "Alle Details". */
.hsg-app .hsg-panel :is(
  .hd-card-link, .hd-heading-link, .hd-text-link,
  .cal27-card-link, .cal27-all-link, .cal45-small-link,
  .staff23-alert-action, .hsg31-close,
  .hsg-cash .cb-tool-link,
  .hsg31-profile-links a,
  .hsg31-mini-list a
) {
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--hsg32-border);
  border-radius: 10px;
  background: var(--hsg32-paper);
  color: var(--hsg32-ink);
  text-decoration: none;
  text-underline-offset: initial;
  text-align: center;
}
.hsg-app .hsg-panel :is(
  .hd-card-link, .hd-heading-link, .hd-text-link,
  .cal27-card-link, .cal27-all-link, .cal45-small-link,
  .staff23-alert-action, .hsg31-close,
  .hsg-cash .cb-tool-link,
  .hsg31-profile-links a,
  .hsg31-mini-list a
):hover {
  background: var(--hsg32-paper-hover);
  border-color: var(--hsg32-border-hover);
}

/* Tabellenaktionen und Paginierung: kompakt, aber eigenstaendige Buttons. */
.hsg-app .hsg-panel :where(table a[href], .hsg31-pagination a[href], .cal30-pagination a[href]) {
  min-height: 40px;
  padding: 7px 11px;
  white-space: normal;
  font-size: .86rem;
}
.hsg-app .hsg-panel :where(.hsg31-pagination a[href], .cal30-pagination a[href]) { min-width: 92px; }

/* Sehr kleine Kalendertagesnummern nicht auf die volle Button-Hoehe ziehen. */
.hsg-app .hsg-panel .cal45-day-number a[href] {
  min-width: 30px;
  min-height: 30px;
  padding: 3px 5px;
  border: 1px solid #dbcab1;
  border-radius: 7px;
  background: #f7f0e4;
  font-size: .8rem;
}

/* Bereits gestaltete Links brauchen dieselbe klare Hover- und Fokus-Rueckmeldung. */
.hsg-app .hsg-panel :is(a.hsg-link-card, a.cal-day-link, a.hd-button, a.cal45-button, a.cal45-chip, a.wh-button, a.cal48-action-link, a.hsg31-action):hover {
  box-shadow: 0 2px 8px rgba(61,43,23,.12);
}

/* Seitenfuss, Konto, oeffentliche Website: keine einfachen Textlinks. */
.hsg-app .hsg-footer a[href],
.hsg-app .hsg-signed-in a.hsg-account-security-link,
.hsg-app a.hsg-sidebar-public,
.hsg-app .hsg-header a.hsg-public-link {
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  max-width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--hsg32-border);
  border-radius: 9px;
  background: var(--hsg32-paper);
  color: var(--hsg32-ink);
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  line-height: 1.3;
}
.hsg-app .hsg-footer a[href] { display: inline-flex; margin: 3px 4px; }
.hsg-app .hsg-signed-in a.hsg-account-security-link { display: inline-flex; margin-top: 6px; font-size: .76rem; }
.hsg-app a.hsg-sidebar-public { display: block; }
.hsg-app .hsg-footer a[href]:hover,
.hsg-app .hsg-signed-in a.hsg-account-security-link:hover,
.hsg-app a.hsg-sidebar-public:hover,
.hsg-app .hsg-header a.hsg-public-link:hover {
  background: var(--hsg32-paper-hover);
  border-color: var(--hsg32-border-hover);
}

/* Desktop-Navigation sichtbar als interaktive Flaechen statt einfache Zeilen. */
.hsg-app .hsg-desktop-nav a.hsg-nav-link {
  border: 1px solid #e0d0b8;
  background: rgba(255,253,249,.7);
}
.hsg-app .hsg-desktop-nav a.hsg-nav-link:hover {
  background: #ecdfcb;
  border-color: #b79b73;
}
.hsg-app .hsg-desktop-nav a.hsg-nav-link.is-active {
  background: #e7dac3;
  border-color: #baa079;
}

/* Aufklappbare Verwaltungsfunktionen erhalten eine sichtbare Ausloeseflaeche. */
.hsg-app .hsg-panel details:not(.cal45-editor) > summary {
  border: 1px solid #d9c8aa;
  border-radius: 9px;
  background: #fcf6ec;
  padding: 10px 13px;
  cursor: pointer;
}
.hsg-app .hsg-panel details:not(.cal45-editor) > summary:hover { background: #f4e7d2; }
.hsg-app .hsg-panel details[open]:not(.cal45-editor) > summary { background: #f1e5d2; border-color: #bba079; }

/* Reset-Aktionen bleiben echte Formulareingaben, sehen aber wie Buttons aus. */
.hsg-app .hsg-panel :is(button[type="reset"], input[type="reset"]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 13px;
  border: 1px solid var(--hsg32-border);
  border-radius: 10px;
  background: var(--hsg32-paper);
  color: var(--hsg32-ink);
  font-weight: 700;
  cursor: pointer;
}
.hsg-app .hsg-panel :is(button[type="reset"], input[type="reset"]):hover { background: var(--hsg32-paper-hover); }

/* Barrierefreier Fokus fuer alle anklickbaren Elemente, auch bereits gestylte Links. */
.hsg-app :is(a[href], button, input[type="reset"], summary):focus-visible {
  outline: 3px solid var(--hsg32-focus);
  outline-offset: 3px;
}
@media (max-width: 620px) {
  .hsg-app .hsg-panel :where(table a[href]) { min-height: 42px; }
  .hsg-app .hsg-panel :where(.hsg31-pagination a[href], .cal30-pagination a[href]) { flex: 1 1 auto; }
  .hsg-app .hsg-panel :where(.hsg31-filters > a[href]) { justify-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  .hsg-app .hsg-panel a[href] { transition: none; }
}

/* Nachtrag 031: ausdrueckliche Aktionshierarchie, nicht nur ein generischer Link. */
.hsg-app .hsg-panel a.hsg32-control {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid var(--hsg32-border);
  border-radius: 10px;
  background: #fffdfa;
  color: var(--hsg32-ink);
  text-decoration: none;
  text-align: center;
  font-weight: 750;
  line-height: 1.25;
  cursor: pointer;
}
.hsg-app .hsg-panel a.hsg32-control-primary {
  background: #79541d;
  border-color: #79541d;
  color: #fff;
}
.hsg-app .hsg-panel a.hsg32-control-primary:hover {
  background: #614219;
  border-color: #614219;
  color: #fff;
}
.hsg-app .hsg-panel a.hsg32-control-outline:hover,
.hsg-app .hsg-panel a.hsg32-control-muted:hover {
  background: var(--hsg32-paper-hover);
  border-color: var(--hsg32-border-hover);
}
.hsg-app .hsg-panel a.hsg32-control-muted {
  background: #f9f3e8;
  border-color: #d7c6a9;
}

/* "Weitere" im schmalen Monatsraster ist ein kompaktes Badge, kein Textlink. */
.hsg-app .hsg-panel a.cal45-more {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 26px;
  padding: 4px 5px;
  border: 1px solid #d4bb97;
  border-radius: 6px;
  background: #f8efdf;
  color: #604219;
  text-decoration: none;
  text-align: center;
  font-weight: 700;
  line-height: 1.15;
}
.hsg-app .hsg-panel a.cal45-more:hover { background: #eddfc6; }
