/* Gusplan design system */
:root {
  --gus-brand: #00ced1;
  --gus-brand-dark: #009a9c;
  --gus-surface: #f8fafc;
  --gus-border: #e2e8f0;
  --gus-text: #0f172a;
  --gus-text-muted: #64748b;
  --gus-radius: 12px;
  --gus-radius-sm: 8px;
  --bs-primary: #00ced1;
  --bs-primary-rgb: 0, 206, 209;
  --bs-link-color: #009a9c;
  --bs-link-hover-color: #007a7c;
  --bs-border-radius: var(--gus-radius-sm);
  --bs-border-radius-lg: var(--gus-radius);
  --bs-body-bg: var(--gus-surface);
  --bs-body-color: var(--gus-text);
  --bs-font-sans-serif: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.btn-primary {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--gus-brand);
  --bs-btn-border-color: var(--gus-brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--gus-brand-dark);
  --bs-btn-hover-border-color: var(--gus-brand-dark);
  --bs-btn-focus-shadow-rgb: 0, 206, 209;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--gus-brand-dark);
  --bs-btn-active-border-color: var(--gus-brand-dark);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--gus-brand);
  --bs-btn-disabled-border-color: var(--gus-brand);
}

.btn-outline-primary {
  --bs-btn-color: var(--gus-brand-dark);
  --bs-btn-border-color: var(--gus-brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--gus-brand);
  --bs-btn-hover-border-color: var(--gus-brand);
  --bs-btn-focus-shadow-rgb: 0, 206, 209;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--gus-brand-dark);
  --bs-btn-active-border-color: var(--gus-brand-dark);
  --bs-btn-disabled-color: var(--gus-brand);
  --bs-btn-disabled-bg: transparent;
  --bs-btn-disabled-border-color: var(--gus-brand);
}

.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--gus-brand);
  --bs-dropdown-link-active-color: #fff;
}

body {
  min-height: 100vh;
}

@media (min-width: 576px) {
  html {
    overflow-y: scroll;
  }
}

body.guest,
body.admin {
  background: var(--gus-surface);
}

.gus-nav {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: linear-gradient(135deg, #00ced1 0%, #00b8bb 100%);
  border-bottom: none;
  color: #fff;
}

body.guest .gus-tabs {
  display: flex;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 3px;
  border-radius: 10px;
}

body.guest .gus-tab {
  border: none;
  background: transparent;
  padding: 0.35rem 0.85rem;
  min-height: 44px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

body.guest .gus-tab.active {
  background: #fff;
  color: var(--gus-brand-dark);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

body.admin .gus-nav .btn-outline-secondary {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.gus-brand-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
}

.gus-logo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.gus-main {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0));
}

.gus-card {
  background: #fff;
  border: 1px solid var(--gus-border);
  border-radius: var(--gus-radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.gus-conditions-card {
  padding: 0;
}

.gus-conditions-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border: none;
  background: none;
  text-align: left;
  cursor: pointer;
  min-height: 44px;
}

.gus-conditions-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--gus-text-muted);
}

.gus-conditions-chevron {
  color: var(--gus-text-muted);
  transition: transform 0.15s ease;
}

.gus-conditions-toggle[aria-expanded="true"] .gus-conditions-chevron {
  transform: rotate(180deg);
}

.gus-conditions-body {
  padding: 0.65rem 0.85rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.gus-conditions-line {
  margin: 0.35rem 0 0;
}

.gus-conditions-line:first-child {
  margin-top: 0;
}

.gus-conditions-divider {
  margin: 0.4rem 0;
  border: 0;
  border-top: 1px solid var(--gus-border);
  opacity: 1;
}

.gus-conditions-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.gus-conditions-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid var(--gus-border);
  font-size: 0.75rem;
  font-weight: 600;
}

.gus-conditions-chip .bi {
  font-size: 0.85em;
  opacity: 0.85;
}

a.gus-conditions-chip {
  text-decoration: none;
  color: var(--gus-brand-dark);
}

a.gus-conditions-chip:hover {
  background: #e2e8f0;
  color: var(--gus-brand-dark);
}

a.gus-conditions-chip.gus-risk-warn {
  color: #c2410c;
  border-color: #fdba74;
  background: #ffedd5;
}

a.gus-conditions-chip.gus-risk-warn:hover {
  background: #fed7aa;
  color: #c2410c;
}

a.gus-conditions-chip.gus-risk-danger {
  color: #b91c1c;
  border-color: #fca5a5;
  background: #fee2e2;
}

a.gus-conditions-chip.gus-risk-danger:hover {
  background: #fecaca;
  color: #b91c1c;
}

.gus-alert-banner {
  border-radius: var(--gus-radius-sm);
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.gus-alert-orange {
  background: #ffedd5;
  border: 1px solid #fdba74;
  color: #9a3412;
}

.gus-alert-red {
  background: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.gus-alert-more {
  display: inline-block;
  margin-left: 0.35rem;
  font-weight: 600;
  color: inherit;
}

.gus-day-card {
  background: #fff;
  border: 1px solid var(--gus-border);
  border-radius: var(--gus-radius);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.gus-day-head {
  padding: 0.65rem 0.85rem;
  background: #f1f5f9;
  border-bottom: 1px solid var(--gus-border);
  font-weight: 700;
  font-size: 0.9375rem;
  text-transform: capitalize;
}

.gus-shift-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--gus-border);
}

.gus-shift-row:last-child {
  border-bottom: none;
}

.gus-shift-time-col {
  min-width: 3.25rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
}

.gus-shift-time {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--gus-brand-dark);
}

.gus-shift-duft {
  height: 1.275rem;
}

.gus-shift-host {
  font-weight: 600;
  font-size: 0.9375rem;
}

.gus-shift-theme {
  font-size: 0.8125rem;
  color: var(--gus-text-muted);
  margin-top: 0.15rem;
}

.gus-shift-past {
  opacity: 0.55;
}

.cal-table {
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid var(--gus-border);
}

.cal-table th,
.cal-table td {
  border: 1px solid var(--gus-border);
  vertical-align: top;
}

.cal-table-head {
  background: #f1f5f9;
}

.cal-cell {
  padding: 0.25rem;
}

.cal-cell-inner {
  min-height: 4.75rem;
}

.cal-num {
  font-weight: 600;
  font-size: 0.75rem;
}

.cal-today-num {
  font-weight: 800;
  color: var(--gus-brand-dark);
}

.cal-chip {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 0.75rem;
  line-height: 1.25;
  padding: 0.35rem 0.4rem;
  margin-bottom: 0.2rem;
  white-space: normal;
  border-radius: 6px;
  min-height: 2.75rem;
  box-shadow: none;
}

.cal-chip:hover,
.cal-chip:focus-visible,
.cal-chip:active {
  box-shadow: none;
}

.cal-chip-gray {
  --bs-btn-bg: #f1f5f9;
  --bs-btn-border-color: #cbd5e1;
  --bs-btn-color: #0f172a;
  --bs-btn-hover-bg: #e2e8f0;
  --bs-btn-hover-border-color: #94a3b8;
  --bs-btn-hover-color: #0f172a;
  --bs-btn-active-bg: #cbd5e1;
  --bs-btn-active-border-color: #64748b;
  --bs-btn-active-color: #0f172a;
}

.cal-chip-green {
  --bs-btn-bg: #dcfce7;
  --bs-btn-border-color: #86efac;
  --bs-btn-color: #14532d;
  --bs-btn-hover-bg: #bbf7d0;
  --bs-btn-hover-border-color: #4ade80;
  --bs-btn-hover-color: #14532d;
  --bs-btn-active-bg: #86efac;
  --bs-btn-active-border-color: #22c55e;
  --bs-btn-active-color: #14532d;
}

.cal-chip-blue {
  --bs-btn-bg: var(--gus-brand);
  --bs-btn-border-color: var(--gus-brand);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--gus-brand-dark);
  --bs-btn-hover-border-color: var(--gus-brand-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: #007a7c;
  --bs-btn-active-border-color: #007a7c;
  --bs-btn-active-color: #fff;
}

.cal-chip-time {
  display: block;
  font-weight: 700;
  overflow: hidden;
  white-space: nowrap;
}

.gus-duftfri-mark {
  display: inline-block;
  width: auto;
  vertical-align: middle;
}

.cal-legend-duft,
.cal-chip-duft {
  height: 1rem;
}

.gus-slot-duft {
  height: 1em;
}

.cal-chip-duft {
  margin-left: 0.15rem;
}

.cal-chip-host {
  display: block;
  font-size: 0.6875rem;
  opacity: 0.9;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  list-style: none;
  margin: 0.85rem 0 0;
  padding: 0;
  font-size: 0.75rem;
  color: var(--gus-text-muted);
}

.cal-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.cal-legend-icon {
  font-size: 0.85rem;
  line-height: 1;
  color: #a16207;
  flex-shrink: 0;
}

.cal-legend-swatch {
  width: 0.85rem;
  height: 0.85rem;
  border-radius: 3px;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.cal-legend-swatch.cal-chip-green {
  background: #dcfce7;
  border-color: #86efac;
}

.cal-legend-swatch.cal-chip-blue {
  background: var(--gus-brand);
  border-color: var(--gus-brand);
}

.cal-legend-swatch.cal-chip-gray {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

.gus-admin-nav-actions {
  margin-left: auto;
}

body.admin .gus-admin-nav-actions .btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  line-height: 1;
  box-sizing: border-box;
}

.gus-touch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}

body.admin .gus-admin-nav-actions a.btn {
  text-decoration: none;
}

.gus-filter-weekly .form-check-label {
  font-size: 1rem;
}

.gus-footer-link {
  font-size: 0.8125rem;
  color: var(--gus-text-muted);
  text-decoration: none;
}

body.guest .gus-guest-footer {
  margin-top: 3rem;
  padding-top: 4rem;
  padding-bottom: 1.25rem;
}

.gus-footer-link:hover {
  color: var(--gus-brand-dark);
}

/* Notify modal — single type scale, matches day cards */
.gus-notify-modal {
  border: 1px solid var(--gus-border);
  border-radius: var(--gus-radius);
  overflow: visible;
}

.gus-notify-modal .gus-notify-body {
  overflow: visible;
}

.gus-notify-modal .gus-modal-header {
  padding: 1rem 1.25rem 0;
  border-bottom: 0;
}

.gus-notify-header {
  align-items: flex-start;
  gap: 0.5rem;
}

.gus-modal-title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: var(--gus-text);
}

.gus-notify-body {
  padding: 1rem 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.gus-notify-about {
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
  margin: 0;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.45;
  color: var(--gus-text-muted);
}

.gus-notify-about-icon {
  flex-shrink: 0;
  margin-top: 0.1rem;
  font-size: 0.875rem;
  color: var(--gus-brand-dark);
}

.gus-notify-about-text {
  flex: 1;
  min-width: 0;
}

.gus-notify-hours-dropdown {
  display: inline-block;
  vertical-align: baseline;
}

.gus-notify-hours-dropdown .dropdown-menu {
  --bs-dropdown-font-size: 0.875rem;
  font-size: 0.875rem;
  z-index: 1060;
}

.gus-notify-hours-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin: 0;
  padding: 0 0 0 0.15rem;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.875rem;
  line-height: inherit;
  color: inherit;
  vertical-align: baseline;
}

.gus-notify-hours-btn:hover,
.gus-notify-hours-btn:focus,
.gus-notify-hours-btn.show {
  color: inherit;
  background: none;
  box-shadow: none;
}

.gus-notify-hours-btn #notify-hours-display {
  font-weight: 600;
  color: var(--gus-brand-dark);
}

.gus-notify-footer {
  padding: 0 1.25rem 1.25rem;
  border-top: 0;
  gap: 0.5rem;
  justify-content: flex-end;
}

.gus-notify-footer #notify-remove {
  margin-right: auto;
}

.gus-notify-footer #shift-unregister {
  margin-right: auto;
}

.gus-notify-status {
  margin-top: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--gus-radius-sm);
  font-size: 0.875rem;
  line-height: 1.4;
}

.gus-notify-status-warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.gus-notify-status-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.gus-toast-host {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 1080;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(22rem, calc(100vw - 1.5rem));
  pointer-events: none;
}

.gus-toast {
  background: #0f172a;
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--gus-radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
  opacity: 0;
  transform: translateY(0.5rem);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.gus-toast-show {
  opacity: 1;
  transform: translateY(0);
}

.gus-toast-ok {
  background: #0f766e;
}

.gus-super-warn {
  z-index: 1020;
  top: 0.5rem;
}

.gus-super-bar {
  position: sticky;
  bottom: 0;
  z-index: 1020;
  padding: 0.75rem 0;
  background: linear-gradient(transparent, var(--gus-surface) 30%);
  pointer-events: none;
}

.gus-super-bar .btn {
  pointer-events: auto;
}

.gus-slot-row {
  cursor: pointer;
}

.gus-slot-row .form-check-input {
  cursor: pointer;
}

.gus-info-modal .badge {
  font-size: 0.6875rem;
  font-weight: 600;
  vertical-align: middle;
}

@media (max-width: 575.98px) {
  .cal-chip {
    font-size: 0.8125rem;
    min-height: 3rem;
  }
  .cal-chip-host {
    font-size: 0.75rem;
  }
}
