/* Shada Royal Shipping Specialist Ltd — Dual Theme Design System
 * Light Theme: Sovereign Maritime Luxe (Default)
 * Dark Theme: Obsidian Sovereign Maritime
 */

:root, html.light {
  /* Default: Light Mode (Sovereign Maritime Luxe) */
  --c-bg: #F8F9FC;
  --c-surface: #F1F4FA;
  --c-surface-deck: #EDF1FA;
  --c-surface-elevated: #FFFFFF;
  --c-surface-overlay: #E4EAF7;
  --c-surface-bright: #D6E0F5;
  --c-border-hairline: #D5DDEC;
  --c-border-luminescent: #B8C6E0;
  --c-gold-regal: #D49228;
  --c-gold-light: #B87914;
  --c-gold-burnished: #9E650B;
  --c-text-pure: #0B1B3D;
  --c-text-silver: #132347;
  --c-text-muted: #334155;
  --c-text-slate: #52637A;
  --c-on-gold: #FFFFFF;
  --c-header-bg: rgba(248, 249, 252, 0.94);
  --c-footer-bg: #0B1B3D;
  --c-footer-bottom: #071229;
  --c-shadow: rgba(11, 27, 61, 0.08);
}

html.dark {
  /* Dark Mode (Obsidian Sovereign Maritime) */
  --c-bg: #070E1E;
  --c-surface: #0c1323;
  --c-surface-deck: #0A1428;
  --c-surface-elevated: #101E38;
  --c-surface-overlay: #162646;
  --c-surface-bright: #232a3b;
  --c-border-hairline: #1E3358;
  --c-border-luminescent: #284270;
  --c-gold-regal: #E5A93C;
  --c-gold-light: #F3C669;
  --c-gold-burnished: #D49228;
  --c-text-pure: #FFFFFF;
  --c-text-silver: #F1F5F9;
  --c-text-muted: #CBD5E1;
  --c-text-slate: #94A3B8;
  --c-on-gold: #070E1E;
  --c-header-bg: rgba(7, 14, 30, 0.94);
  --c-footer-bg: #050914;
  --c-footer-bottom: #03060c;
  --c-shadow: rgba(0, 0, 0, 0.55);
}

html, body {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
  background-color: var(--c-bg);
  color: var(--c-text-silver);
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--c-bg);
}
::-webkit-scrollbar-thumb {
  background: var(--c-border-luminescent);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--c-gold-regal);
}

/* Sovereign Rim Highlight */
.sovereign-rim {
  position: relative;
}
.sovereign-rim::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, #E5A93C 50%, transparent 100%);
  pointer-events: none;
}

/* Smooth modal transitions */
.modal-backdrop {
  transition: opacity 0.2s ease-in-out;
}

/* Enforce horizontal single-line text across all navigation menus, header bars, and tab controls */
header nav,
header nav a,
header button,
header a,
nav a,
.filter-btn,
.filter-chip,
.depot-btn,
.toc-link,
#tab-book,
#tab-track {
  white-space: nowrap !important;
  flex-shrink: 0;
}

/* Hide scrollbar on horizontal scrollable menu bars while keeping scrollability */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Print Styles for Terms & Conditions */
@media print {
  header, footer, nav, #floating-controls, #quickCategoryBar, aside {
    display: none !important;
  }
  main {
    padding-top: 0 !important;
  }
  .clause-section {
    display: flex !important;
    break-inside: avoid;
    border: 1px solid #ccc !important;
    margin-bottom: 1rem;
  }
}
