/* Gaya Civic & Estate — Shared Platform Stylesheet (Phase 1 Foundation) */
:root {
  --gaya-primary: #001d31;
  --gaya-primary-container: #183247;
  --gaya-secondary: #266954;
  --gaya-secondary-container: #adf1d5;
  --gaya-tertiary: #341000;
  --gaya-surface: #faf9f6;
  --gaya-surface-lowest: #ffffff;
  --gaya-border: #e6e8e5;
  --gaya-text-primary: #1a1c1a;
  --gaya-text-secondary: #43474c;
}

/* Enforce OpenType Tabular Numerals for INR & Land Units per DESIGN.md */
.font-label-numeric,
.font-headline-sm,
.font-headline-md,
table td,
[data-tabular="true"] {
  font-variant-numeric: tabular-nums;
}

/* Floating 24-Screen Navigator & Bihar Unit Converter Dock */
#gaya-platform-dock {
  position: fixed;
  bottom: 18px;
  left: 18px;
  z-index: 9990;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

#gaya-dock-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #001d31;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 32px -4px rgba(24, 50, 71, 0.22), 0 4px 12px -2px rgba(24, 50, 71, 0.12);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

#gaya-dock-trigger:hover {
  background: #183247;
  transform: translateY(-1px);
}

#gaya-dock-trigger .gaya-badge-pill {
  background: #266954;
  color: #ffffff;
  font-size: 10px;
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#gaya-dock-panel {
  display: none;
  width: 420px;
  max-width: calc(100vw - 36px);
  max-height: 78vh;
  background: #ffffff;
  color: #1a1c1a;
  border: 1px solid #c3c7cd;
  border-radius: 14px;
  box-shadow: 0 16px 40px -4px rgba(0, 29, 49, 0.22);
  margin-bottom: 10px;
  overflow: hidden;
  flex-direction: column;
}

#gaya-dock-panel.is-open {
  display: flex;
}

.gaya-dock-header {
  background: #001d31;
  color: #ffffff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gaya-dock-tabs {
  display: flex;
  background: #f4f3f1;
  border-bottom: 1px solid #e3e2e0;
  padding: 4px;
  gap: 4px;
}

.gaya-dock-tab {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  color: #43474c;
  background: transparent;
  border: none;
}

.gaya-dock-tab.active {
  background: #ffffff;
  color: #001d31;
  box-shadow: 0 1px 3px rgba(0, 29, 49, 0.08);
}

.gaya-dock-body {
  padding: 12px 14px;
  overflow-y: auto;
  max-height: 56vh;
}

.gaya-flow-group {
  margin-bottom: 12px;
}

.gaya-flow-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #266954;
  margin-bottom: 5px;
  padding-bottom: 3px;
  border-bottom: 1px solid #efeeeb;
}

.gaya-screen-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 12px;
  color: #1a1c1a;
  text-decoration: none;
  transition: background 0.12s ease;
  margin-bottom: 2px;
}

.gaya-screen-link:hover {
  background: #f4f3f1;
}

.gaya-screen-link.current {
  background: #cde5ff;
  color: #001d32;
  font-weight: 600;
}

.gaya-screen-num {
  font-size: 10px;
  font-weight: 600;
  color: #73777d;
  min-width: 22px;
}

/* Global Toast Notification */
#gaya-global-toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9995;
  background: #001d31;
  color: #ffffff;
  padding: 12px 16px;
  border-radius: 10px;
  border-left: 4px solid #266954;
  box-shadow: 0 12px 32px -4px rgba(24, 50, 71, 0.25);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  max-width: 360px;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.22s ease, opacity 0.22s ease;
  pointer-events: none;
}

#gaya-global-toast.visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@media print {
  #gaya-platform-dock,
  #gaya-global-toast {
    display: none !important;
  }
}

/* Clean Launch Mobile Responsive Safeguard (prevents 1280px Stitch min-width overflow on <= 768px mobile) */
@media (max-width: 768px) {
  html, body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }
  body, header, main, footer, section, nav {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  header nav {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* Prevent Stitch fixed top-0 header from overlapping #gaya-auth-bar on desktop & mobile */
header.fixed.top-0, header.sticky.top-0 {
  position: relative !important;
  top: auto !important;
}

/* Unified Editorial Design System Tokens (Phase 3) */
:root {
  --gaya-navy: #183247;
  --gaya-forest: #286B55;
  --gaya-ivory: #FAF9F6;
  --gaya-white: #FFFFFF;
  --gaya-text-primary: #202B35;
  --gaya-text-secondary: #66727C;
  --gaya-terracotta: #C47B58;
  --gaya-border: #E6E8E5;
  --gaya-success: #23845B;
}

.gaya-btn-pill {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--gaya-border);
  background: var(--gaya-ivory);
  color: var(--gaya-navy);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.gaya-btn-pill:hover {
  background: #e9eeec;
}

.gaya-btn-pill.gaya-btn-active {
  background: var(--gaya-navy);
  color: var(--gaya-white);
  border-color: var(--gaya-navy);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gaya-forest);
  outline-offset: 2px;
}

@media (max-width: 768px) {
  header > div {
    flex-wrap: wrap !important;
    height: auto !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    gap: 8px !important;
  }
}
