/* Theme System CSS Variables */

/* Default Theme - SP Brand (teal). 2026-04-20 PARITY-LI-BUTTON-TOKENS:
   flipped --theme-primary from navy #003f5c to brand teal #14b8a6 and
   --theme-secondary (btn-primary hover) to darker teal #0d9488 so the
   .btn-primary rule below resolves to brand teal sitewide. Matches the
   DaisyUI theme token --color-primary already set in src/styles.css.

   2026-04-20 PARITY-LI-CARD-STATE (follow-up): the deployed
   tailwind.css is compiled from a prior src/styles.css that named the
   default theme "deep-ocean" with navy primary. base.html sets
   data-theme="sp-brand" which doesn't match anything in the stale
   compile, so Tailwind utilities (border-primary, bg-primary/5,
   bg-primary on step indicators and role-card selected state) fall
   back to the compiled root-default navy. Override --color-primary /
   --color-primary-content / --color-secondary here so the 7 wizards
   without RR's inline escape hatch also render teal. Once the Tailwind
   CSS is rebuilt from the current sp-brand theme this override becomes
   redundant but harmless. */
:root {
    --theme-primary: #14b8a6;
    --theme-secondary: #0d9488;
    --theme-accent: #f4e1c1;
    --theme-bg: #ffffff;
    --theme-text: #4a4a4a;
    --theme-text-light: #717171;
    --theme-border: #e5e7eb;
    --theme-border-light: #f3f4f6;
    --theme-success: #2f9eaa;
    --theme-warning: #ff7043;
    --theme-danger: #ff4e50;
    --theme-info: #003f5c;
    --theme-gradient: linear-gradient(135deg, #003f5c 0%, #2f9eaa 100%);
    --theme-shadow: 0 4px 12px rgba(0, 63, 92, 0.15);
    --theme-shadow-light: 0 2px 8px rgba(0, 63, 92, 0.1);
    --theme-name: 'Deep Ocean';
    --theme-description: 'Fresh, adventurous, trustworthy';
}

/* 2026-04-20 PARITY-LI-CARD-STATE: base.html sets data-theme="sp-brand" but
   the deployed tailwind.css was compiled before sp-brand existed, so
   Tailwind utilities (bg-primary, border-primary, bg-primary/5 on role
   cards and step indicators) resolve --color-primary to the stale
   compile default. Remap here to --theme-primary/--theme-secondary
   already set in :root above, keeping the single source of truth. */
[data-theme="sp-brand"] {
    --color-primary: var(--theme-primary);
    --color-primary-content: #ffffff;
    --color-secondary: var(--theme-secondary);
}

/* Theme 2: Driftwood Nomad */
[data-theme="driftwood"] {
    --theme-primary: #8d6e63;
    --theme-secondary: #00796b;
    --theme-accent: #ff7043;
    --theme-bg: #faf3e0;
    --theme-text: #3e2723;
    --theme-text-light: #5d4037;
    --theme-border: #d7ccc8;
    --theme-border-light: #efebe9;
    --theme-success: #00796b;
    --theme-warning: #ff7043;
    --theme-danger: #d32f2f;
    --theme-info: #8d6e63;
    --theme-gradient: linear-gradient(135deg, #8d6e63 0%, #00796b 100%);
    --theme-shadow: 0 4px 12px rgba(141, 110, 99, 0.15);
    --theme-shadow-light: 0 2px 8px rgba(141, 110, 99, 0.1);
    --theme-name: 'Driftwood Nomad';
    --theme-description: 'Nomadic, community-driven, authentic';
}

/* Theme 3: Midnight Surf */
[data-theme="midnight"] {
    --theme-primary: #0d0d0d;
    --theme-secondary: #00f5d4;
    --theme-accent: #ff4e50;
    --theme-bg: #f9f9f9;
    --theme-text: #0d0d0d;
    --theme-text-light: #5c5c5c;
    --theme-border: #e0e0e0;
    --theme-border-light: #f5f5f5;
    --theme-success: #00f5d4;
    --theme-warning: #ffd54f;
    --theme-danger: #ff4e50;
    --theme-info: #0d0d0d;
    --theme-gradient: linear-gradient(135deg, #0d0d0d 0%, #00f5d4 100%);
    --theme-shadow: 0 4px 12px rgba(13, 13, 13, 0.15);
    --theme-shadow-light: 0 2px 8px rgba(13, 13, 13, 0.1);
    --theme-name: 'Midnight Surf';
    --theme-description: 'Energetic, youthful, tech-savvy';
}

/* Theme 4: Tropical Paradise */
[data-theme="tropical"] {
    --theme-primary: #2e7d32;
    --theme-secondary: #00acc1;
    --theme-accent: #ff6f61;
    --theme-bg: #fefefe;
    --theme-text: #2e7d32;
    --theme-text-light: #5d8a5d;
    --theme-border: #c8e6c9;
    --theme-border-light: #f1f8e9;
    --theme-success: #2e7d32;
    --theme-warning: #ffd54f;
    --theme-danger: #ff6f61;
    --theme-info: #00acc1;
    --theme-gradient: linear-gradient(135deg, #2e7d32 0%, #00acc1 100%);
    --theme-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
    --theme-shadow-light: 0 2px 8px rgba(46, 125, 50, 0.1);
    --theme-name: 'Tropical Paradise';
    --theme-description: 'Aspirational, relaxed, lifestyle-focused';
}

/* Theme 5: Airbnb Classic */
[data-theme="airbnb"] {
    --theme-primary: #FF385C;
    --theme-secondary: #E00007;
    --theme-accent: #00A699;
    --theme-bg: #FFFFFF;
    --theme-text: #222222;
    --theme-text-light: #717171;
    --theme-border: #DDDDDD;
    --theme-border-light: #F7F7F7;
    --theme-success: #00A699;
    --theme-warning: #FFB400;
    --theme-danger: #FF385C;
    --theme-info: #0088CC;
    --theme-gradient: linear-gradient(135deg, #FF385C 0%, #E00007 100%);
    --theme-shadow: 0 4px 12px rgba(255, 56, 92, 0.15);
    --theme-shadow-light: 0 2px 8px rgba(255, 56, 92, 0.1);
    --theme-name: 'Airbnb Classic';
    --theme-description: 'Clean, modern, professional';
}

/* Theme 6: SurfDude */
[data-theme="surfdude"] {
    --theme-primary: #49a6ac !important;
    --theme-secondary: #ff8d39 !important;
    --theme-accent: #404c49 !important;
    --theme-bg: #ffffff !important;
    --theme-text: #404c49 !important;
    --theme-text-light: #6b7b7a !important;
    --theme-border: #e0e0e0 !important;
    --theme-border-light: #f5f5f5 !important;
    --theme-success: #49a6ac !important;
    --theme-warning: #ff8d39 !important;
    --theme-danger: #ff6b6b !important;
    --theme-info: #49a6ac !important;
    --theme-gradient: linear-gradient(135deg, #49a6ac 0%, #ff8d39 100%) !important;
    --theme-shadow: 0 4px 12px rgba(73, 166, 172, 0.15) !important;
    --theme-shadow-light: 0 2px 8px rgba(73, 166, 172, 0.1) !important;
    --theme-name: 'SurfDude';
    --theme-description: 'Cool, laid-back, surf-inspired';
}

/* Theme Switcher Component */
.theme-switcher {
    position: relative;
    display: inline-block;
}

.theme-switcher .btn {
    background: var(--theme-bg);
    border: 2px solid var(--theme-border);
    color: var(--theme-text);
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    box-shadow: var(--theme-shadow-light);
}

.theme-switcher .btn:hover {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: var(--theme-bg);
    transform: translateY(-2px);
    box-shadow: var(--theme-shadow);
}

.theme-switcher .dropdown-menu {
    min-width: 320px;
    border: 2px solid var(--theme-border);
    border-radius: 16px;
    box-shadow: var(--theme-shadow);
    padding: 1rem;
    background: var(--theme-bg);
}

.theme-option {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.theme-option:hover {
    background: var(--theme-border-light);
    transform: translateX(4px);
}

.theme-option.active {
    background: var(--theme-primary);
    color: var(--theme-bg);
    border-color: var(--theme-primary);
}

.theme-option.active:hover {
    background: var(--theme-primary);
    color: var(--theme-bg);
}

.theme-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.75rem;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.theme-info {
    flex: 1;
}

.theme-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.theme-description {
    font-size: 0.75rem;
    opacity: 0.8;
    margin: 0;
}

.theme-check {
    color: var(--theme-bg);
    font-size: 1rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.theme-option.active .theme-check {
    opacity: 1;
}

/* Theme-specific preview colors */
.theme-preview.deep-ocean {
    background: linear-gradient(135deg, #003f5c 0%, #2f9eaa 100%);
}

.theme-preview.driftwood {
    background: linear-gradient(135deg, #8d6e63 0%, #00796b 100%);
}

.theme-preview.midnight {
    background: linear-gradient(135deg, #0d0d0d 0%, #00f5d4 100%);
}

.theme-preview.tropical {
    background: linear-gradient(135deg, #2e7d32 0%, #00acc1 100%);
}

.theme-preview.airbnb {
    background: linear-gradient(135deg, #FF385C 0%, #E00007 100%);
}

.theme-preview.surfdude {
    background: linear-gradient(135deg, #49a6ac 0%, #ff8d39 100%);
}

/* Apply theme variables to existing elements */
body {
    background-color: var(--theme-bg);
    color: var(--theme-text);
    transition: all 0.3s ease;
}

.navbar {
    background: var(--theme-bg);
    border-bottom: 1px solid var(--theme-border-light);
    box-shadow: var(--theme-shadow-light);
}

.navbar-brand {
    color: var(--theme-primary) !important;
}

.nav-link {
    color: var(--theme-text) !important;
}

.nav-link:hover {
    background-color: var(--theme-border-light);
    color: var(--theme-text) !important;
}

.nav-link.active {
    background-color: var(--theme-primary);
    color: var(--theme-bg) !important;
}

.btn-primary {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: var(--theme-bg);
}

.btn-primary:hover {
    background: var(--theme-secondary);
    border-color: var(--theme-secondary);
    color: var(--theme-bg);
}

.btn-outline-primary {
    border-color: var(--theme-primary);
    color: var(--theme-primary);
}

.btn-outline-primary:hover {
    background: var(--theme-primary);
    border-color: var(--theme-primary);
    color: var(--theme-bg);
}

.btn-outline-secondary {
    border-color: var(--theme-border);
    color: var(--theme-text);
}

.btn-outline-secondary:hover {
    background: var(--theme-border-light);
    border-color: var(--theme-text);
    color: var(--theme-text);
}

.card {
    background: var(--theme-bg);
    border: 1px solid var(--theme-border-light);
    box-shadow: var(--theme-shadow-light);
}

.card:hover {
    box-shadow: var(--theme-shadow);
}

.form-control, .form-select {
    border: 1px solid var(--theme-border);
    background: var(--theme-bg);
    color: var(--theme-text);
}

.form-control:focus, .form-select:focus {
    border-color: var(--theme-primary);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.dropdown-menu {
    background: var(--theme-bg);
    border: 1px solid var(--theme-border-light);
    box-shadow: var(--theme-shadow);
}

.dropdown-item {
    color: var(--theme-text);
}

.dropdown-item:hover {
    background-color: var(--theme-border-light);
    color: var(--theme-text);
}

.dropdown-item.active {
    background-color: var(--theme-primary);
    color: var(--theme-bg);
}

/* Theme transition animations */
* {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .theme-switcher .dropdown-menu {
        min-width: 280px;
        left: -200px;
    }

    .theme-option {
        padding: 0.5rem;
    }

    .theme-preview {
        width: 32px;
        height: 32px;
        margin-right: 0.75rem;
    }
}

/* ==========================================================================
   SP_ custom checkbox — REHOMED from bootstrap-compat.css (KILL-BOOTSTRAP step 2,
   2026-06-05). These are SP_-custom (NOT Bootstrap) and used by login/signup
   (sp-checkbox / sp-checkbox-label); relocated here so they survive the shim
   deletion in step 3. Brand-teal box with white check.
   ========================================================================== */
.sp-checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}
.sp-checkbox {
  appearance: none !important;
  -webkit-appearance: none !important;
  width: 1.5rem !important;
  height: 1.5rem !important;
  min-width: 1.5rem;
  min-height: 1.5rem;
  border: 2px solid #14B8A6 !important;
  border-radius: 4px !important;
  background-color: #ffffff !important;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 0.125rem;
  display: inline-block;
  position: relative;
  transition: background-color 0.15s, border-color 0.15s;
}
.sp-checkbox:hover {
  border-color: #0d9488 !important;
}
.sp-checkbox:focus {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.25);
}
.sp-checkbox:checked {
  background-color: #14B8A6 !important;
  border-color: #14B8A6 !important;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='3.5 8 6.5 11 12 5'/></svg>") !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: 70% 70% !important;
}

/* ==========================================================================
   FE-1 (#48) btn color compat — REHOMED from bootstrap-compat.css (KILL-BOOTSTRAP
   step 3 hotfix, 2026-06-05). daisyUI's --p primary var is a locked compile gotcha
   (renders the wrong color — buttons went RED when the shim was removed). These
   literal-hex overrides are what actually give every .btn-primary its brand teal
   (teal-700 #0F766E, white-on-it = 5.47:1 WCAG AA) and .btn-success WhatsApp green.
   Caught by the step-3 smoke test. Relocated here so primary/success buttons keep
   their color now that the shim is gone.
   ========================================================================== */
.btn-primary {
  background-color: #0F766E !important;
  border-color: #0F766E !important;
  color: #ffffff !important;
}
.btn-primary:hover, .btn-primary:focus {
  background-color: #115E59 !important;
  border-color: #115E59 !important;
  color: #ffffff !important;
}
.btn-success {
  background-color: #008069 !important;
  border-color: #008069 !important;
  color: #ffffff !important;
}
.btn-success:hover, .btn-success:focus {
  background-color: #006652 !important;
  border-color: #006652 !important;
  color: #ffffff !important;
}
