/* =============================================================================
   BOOKY AI — Design Token System
   colors.css

   Structure:
     1. Primitive Palette      — raw color values, no semantics
     2. Semantic Tokens        — light theme defaults (on :root)
     3. Dark Theme Override    — [data-theme="dark"] or body.theme-dark
     4. Component Aliases      — convenience shorthands used in components
   =============================================================================


/* =============================================================================
   1. PRIMITIVE PALETTE
   Never use these directly in components. Reference semantic tokens instead.
   ============================================================================= */

:root {

  /* --- Brand: Booky Green --- */
  --color-green-100: #dcfce7;
  --color-green-200: #a7f3d0;
  --color-green-300: #6ee7b7;
  --color-green-400: #34d399;   /* light / hover state */
  --color-green-500: #10b981;   /* mid-tone */
  --color-green-600: #1faa6f;   /* primary brand */
  --color-green-700: #0c7e4f;   /* main CTA - good contrast on white */
  --color-green-800: #065f3a;   /* pressed / active */
  --color-green-900: #064e31;   /* darkest */

  /* --- Neutrals: Slate --- */
  --color-slate-0:   #ffffff;
  --color-slate-50:  #f8fafc;
  --color-slate-100: #f1f5f9;
  --color-slate-150: #eaf0f6;   /* extra step for subtle borders */
  --color-slate-200: #e2e8f0;
  --color-slate-300: #cbd5e1;
  --color-slate-400: #94a3b8;
  --color-slate-500: #64748b;
  --color-slate-600: #475569;
  --color-slate-700: #334155;
  --color-slate-800: #1e293b;
  --color-slate-900: #111827;
  --color-slate-950: #0a0f1a;

  /* --- Neutrals: True Gray (Dark Mode Surfaces) --- */
  --color-gray-900: oklch(18.5% 0 0);
  --color-gray-850: oklch(20%   0 0);
  --color-gray-800: oklch(22%   0 0);
  --color-gray-750: oklch(25%   0 0);
  --color-gray-700: oklch(28%   0 0);
  --color-gray-600: oklch(35%   0 0);
  --color-gray-500: oklch(55%   0 0);
  --color-gray-400: #cecece;

  /* --- Semantic Status Colors --- */
  --color-success-light: #d1fae5;
  --color-success:       #10b981;
  --color-success-dark:  #059669;

  --color-warning-light: #fef9c3;
  --color-warning:       #f59e0b;
  --color-warning-dark:  #d17d06;

  --color-error-light:   #fee2e2;
  --color-error:         #ef4444;
  --color-error-dark:    #dc2626;

  --color-info-light:    #dbeafe;
  --color-info:          #3b82f6;
  --color-info-dark:     #2563eb;

  /* --- Industry Accents --- */
  --color-accent-cleaning:    #14b8a6;  /* teal   */
  --color-accent-real-estate: #8b5cf6;  /* violet */
  --color-accent-home:        #f97316;  /* orange */
  --color-accent-wellness:    #06b6d4;  /* cyan   */


  /* =============================================================================
     2. SEMANTIC TOKENS — Light Theme (Default)
     ============================================================================= */

  /* --- Brand / Primary --- */
  --brand-light:       var(--color-green-400);
  --brand:             var(--color-green-700);
  --brand-dark:        var(--color-green-800);

  /* RGB variants for rgba() usage */
  --brand-rgb:         12, 126, 79;      /* #0c7e4f */
  --brand-light-rgb:   52, 211, 153;     /* #34d399 */
  --brand-dark-rgb:    6, 95, 58;        /* #065f3a */

  /* --- Backgrounds --- */
  --bg-page:           #faf9f6;          /* warm off-white — main page bg     */
  --bg-subtle:         var(--color-slate-50);   /* slightly off-white sections  */
  --bg-card:           #ffffff;          /* cards, modals, panels              */
  --bg-card-raised:    var(--color-slate-100);  /* elevated cards, dropdowns    */
  --bg-inset:          var(--color-slate-100);  /* inputs, code blocks          */

  /* --- Borders --- */
  --border-subtle:     var(--color-slate-150);  /* very faint dividers           */
  --border-default:    var(--color-slate-200);  /* standard borders              */
  --border-strong:     var(--color-slate-300);  /* emphasized borders, inputs    */

  /* --- Text --- */
  --text-primary:      var(--color-slate-900);  /* headings, high-contrast copy  */
  --text-secondary:    var(--color-slate-600);  /* sub-headings, labels          */
  --text-muted:        var(--color-slate-500);  /* placeholders, helper text     */
  --text-disabled:     var(--color-slate-400);  /* disabled states               */
  --text-inverse:      #ffffff;                 /* text on dark/brand bg         */
  --text-on-brand:     #ffffff;                 /* text sitting on brand color   */

  /* --- Glass / Frosted Panels --- */
  --glass-bg:          rgba(0, 0, 0, 0.03);
  --glass-bg-hover:    rgba(0, 0, 0, 0.06);
  --glass-border:      rgba(0, 0, 0, 0.08);
  --glass-text-muted:  rgba(0, 0, 0, 0.45);

  /* --- Typography Scale Tokens --- */
  --font-xs:   0.6875rem;  /* 11px */
  --font-sm:   0.8125rem;  /* 13px */
  --font-base: 0.875rem;   /* 14px - standard SaaS body/table cell */
  --font-md:   1rem;       /* 16px - standard input / reading body */
  --font-lg:   1.125rem;   /* 18px */
  --font-xl:   1.25rem;    /* 20px */
  --font-2xl:  1.5rem;     /* 24px */
  --font-xxl:  1.5rem;     /* alias for backward compatibility */

  /* --- Font Families --- */
  --font-sans: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace;

  /* --- Shadows --- */
  --shadow-xs:   0 1px 2px  0 rgba(0, 0, 0, 0.05);
  --shadow-sm:   0 1px 3px  0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md:   0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg:   0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
  --shadow-xl:   0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  --shadow-focus: 0 0 0 3px rgba(var(--brand-rgb), 0.25);

  /* --- Spacing Scale --- */
  --space-2xs:  0.25rem;   /*  4px */
  --space-xs:   0.5rem;    /*  8px */
  --space-sm:   0.75rem;   /* 12px */
  --space-md:   1rem;      /* 16px */
  --space-lg:   1.5rem;    /* 24px */
  --space-xl:   2rem;      /* 32px */
  --space-2xl:  3rem;      /* 48px */
  --space-3xl:  4rem;      /* 64px */
  --space-4xl:  6rem;      /* 96px */
  --space-5xl:  8rem;      /* 128px */

  /* --- Border Radius --- */
  --radius-sm:   0.25rem;   /*  4px */
  --radius-md:   0.5rem;    /*  8px */
  --radius-lg:   0.75rem;   /* 12px */
  --radius-xl:   1rem;      /* 16px */
  --radius-2xl:  1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* --- Z-Index Scale --- */
  --z-base:       0;
  --z-raised:     10;
  --z-dropdown:   100;
  --z-sticky:     200;
  --z-overlay:    300;
  --z-modal:      400;
  --z-toast:      500;
  --z-tooltip:    600;

  /* --- Transitions --- */
  --transition-fast:   150ms ease;
  --transition-base:   200ms ease;
  --transition-slow:   300ms ease;

  /* --- Semantic Shortcuts (global status colors, same in both themes) --- */
  --status-success:       var(--color-success);
  --status-success-dark:  var(--color-success-dark);
  --status-success-bg:    var(--color-success-light);
  --status-warning:       var(--color-warning);
  --status-warning-dark:  var(--color-warning-dark);
  --status-warning-bg:    var(--color-warning-light);
  --status-error:         var(--color-error);
  --status-error-dark:    var(--color-error-dark);
  --status-error-bg:      var(--color-error-light);
  --status-info:          var(--color-info);
  --status-info-dark:     var(--color-info-dark);
  --status-info-bg:       var(--color-info-light);

  /* --- Industry Accents (global) --- */
  --accent-cleaning:    var(--color-accent-cleaning);
  --accent-real-estate: var(--color-accent-real-estate);
  --accent-home:        var(--color-accent-home);
  --accent-wellness:    var(--color-accent-wellness);
}


/* =============================================================================
   3. DARK THEME OVERRIDE
   Only override tokens that change between themes.
   Primitives, spacing, radius, z-index, and transitions stay the same.
   ============================================================================= */

body.theme-dark,
.theme-dark,
[data-theme="dark"],
[data-bs-theme="dark"] {

  /* --- Brand stays the same (green works on dark) --- */
  --brand-light:      var(--color-green-400);
  --brand:            var(--color-green-600);   /* slightly lighter for dark bg */
  --brand-dark:       var(--color-green-700);

  /* --- Backgrounds --- */
  --bg-page:          var(--color-gray-900);    /* oklch(18.5% 0 0) */
  --bg-subtle:        oklch(17% 0 0);           /* slightly darker than page    */
  --bg-card:          var(--color-gray-850);    /* oklch(20% 0 0)   */
  --bg-card-raised:   var(--color-gray-800);    /* oklch(22% 0 0)   */
  --bg-inset:         oklch(18.674% 0.00002 271.152);           /* inputs, code blocks          */

  /* --- Borders --- */
  --border-subtle:    #1e1e1e;
  --border-default:   #2c2c2c;
  --border-strong:    #3a3a3a;

  /* --- Text --- */
  --text-primary:     #f9fafb;
  --text-secondary:   var(--color-gray-400);    /* #cecece */
  --text-muted:       var(--color-gray-400);
  --text-disabled:    var(--color-gray-600);
  --text-inverse:     var(--color-slate-900);
  --text-on-brand:    #ffffff;

  /* --- Glass / Frosted Panels --- */
  --glass-bg:          rgba(255, 255, 255, 0.03);
  --glass-bg-hover:    rgba(255, 255, 255, 0.06);
  --glass-border:      rgba(255, 255, 255, 0.08);
  --glass-text-muted:  rgba(255, 255, 255, 0.45);


  /* --- Shadows (stronger on dark, use color not opacity) --- */
  --shadow-xs:   0 1px 2px  0 rgba(0, 0, 0, 0.3);
  --shadow-sm:   0 1px 3px  0 rgba(0, 0, 0, 0.4),  0 1px 2px -1px rgba(0, 0, 0, 0.3);
  --shadow-md:   0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg:   0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
  --shadow-xl:   0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.4);
  --shadow-focus: 0 0 0 3px rgba(var(--brand-rgb), 0.35);

  /* Status bg tints are darker in dark mode */
  --status-success-bg:  rgba(16,  185, 129, 0.12);
  --status-warning-bg:  rgba(245, 158,  11, 0.12);
  --status-error-bg:    rgba(239,  68,  68, 0.12);
  --status-info-bg:     rgba(59,  130, 246, 0.12);
}


/* =============================================================================
   4. COMPONENT ALIASES
   Shorthand aliases kept for backward compatibility and convenience.
   These map old names → new semantic tokens so existing code doesn't break.
   Remove these gradually as you migrate component files.
   ============================================================================= */

:root {

  /* Legacy primary aliases */
  --primary-light:     var(--brand-light);
  --primary:           var(--brand);
  --primary-dark:      var(--brand-dark);
  --primary-rgb:       var(--brand-rgb);
  --primary-light-rgb: var(--brand-light-rgb);
  --primary-dark-rgb:  var(--brand-dark-rgb);

  /* Legacy surface/text aliases */
  --bg-dark:           var(--bg-page);
  --border-color:      var(--border-default);
  --text-dark:         var(--text-primary);
  --text-light:        var(--text-primary);
  --text-secondary:    var(--text-secondary);
  --muted-text:        var(--text-muted);
  --text-muted:        var(--text-muted);

  /* Legacy secondary aliases */
  --secondary:         var(--bg-card-raised);
  --secondary-dark:    var(--border-default);
  --secondary-rgb:     241, 245, 249;
  --secondary-dark-rgb: 226, 232, 240;

  /* Legacy semantic shortcuts */
  --success:       var(--status-success);
  --success-dark:  var(--status-success-dark);
  --warning:       var(--status-warning);
  --warning-dark:  var(--status-warning-dark);
  --error:         var(--status-error);
  --error-dark:    var(--status-error-dark);
  --info:          var(--status-info);
  --info-dark:     var(--status-info-dark);

  /* Legacy industry accents */
  --cleaning-services: var(--accent-cleaning);
  --real-estate:       var(--accent-real-estate);
  --home-services:     var(--accent-home);
  --wellness:          var(--accent-wellness);
}


/* =============================================================================
   BOOKY AI — Typography, Badges & Color Utilities
   typography.css
   ============================================================================= */


/* =============================================================================
   1. BASE BODY
   ============================================================================= */

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition:
    background-color var(--transition-slow),
    color            var(--transition-slow);
}


/* =============================================================================
   2. SMOOTH SURFACE TRANSITIONS
   Applied to interactive surfaces that may change color on theme switch.
   ============================================================================= */

.card,
.navbar-modern,
.footer-modern,
.nav-dropdown,
.dropdown-menu,
.btn,
.modal-content,
.form-control,
.form-select {
  transition:
    background-color var(--transition-base),
    border-color     var(--transition-base),
    color            var(--transition-base);
}


/* =============================================================================
   3. HEADINGS
   Display type is always roman (no italic headers), with anti-slop typography
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.015em;
}

/* Emphasis inside headings carries via weight or brand accent, never fake italics */
h1 em, h2 em, h3 em, h4 em, h5 em, h6 em {
  font-style: normal;
  font-weight: 700;
  color: var(--brand);
}

/* Modular scale — ratio 1.2 (minor third) */
h1 { font-size: 2.074rem; }
h2 { font-size: 1.728rem; }
h3 { font-size: 1.44rem;  }
h4 { font-size: 1.2rem;   }
h5 { font-size: 1rem;     }
h6 { font-size: 0.875rem; font-weight: 700; letter-spacing: 0.02em; }


/* =============================================================================
   4. BODY TEXT
   ============================================================================= */

p {
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

small,
.text-small {
  font-size: 0.833rem;
  line-height: 1.5;
}

strong, b {
  font-weight: 600;
  color: var(--text-primary);
}

/* Inline code */
code {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-size: 0.85em;
  background-color: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.1em 0.35em;
  color: var(--brand);
}

/* Links */
a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

/* Blockquote */
blockquote {
  border-left: 3px solid var(--brand);
  padding: var(--space-sm) var(--space-md);
  margin: var(--space-md) 0;
  background-color: var(--glass-bg);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  color: var(--text-secondary);
  font-style: italic;
}

/* Horizontal rule */
hr {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: var(--space-lg) 0;
}


/* =============================================================================
   5. TEXT UTILITY CLASSES
   Note: these override Bootstrap equivalents — loaded after Bootstrap.
   ============================================================================= */

.text-primary   { color: var(--brand)           !important; }
.text-secondary { color: var(--text-secondary)   !important; }
.text-muted     { color: var(--text-muted)       !important; }
.text-light     { color: var(--text-primary)     !important; }
.text-dark      { color: var(--text-primary)     !important; }

.text-success   { color: var(--status-success)   !important; }
.text-warning   { color: var(--status-warning)   !important; }
.text-danger    { color: var(--status-error)     !important; }
.text-info      { color: var(--status-info)      !important; }

/* Weight utilities */
.text-normal    { font-weight: 400; }
.text-medium    { font-weight: 500; }
.text-semibold  { font-weight: 600; }
.text-bold      { font-weight: 700; }

/* Size utilities */
.text-xs   { font-size: 0.6875rem; line-height: 1.4; }  /* 11px */
.text-sm   { font-size: 0.8125rem; line-height: 1.5; }  /* 13px */
.text-base { font-size: 0.875rem;  line-height: 1.5; }  /* 14px */
.text-md   { font-size: 1rem;      line-height: 1.6; }  /* 16px */
.text-lg   { font-size: 1.125rem;  line-height: 1.5; }  /* 18px */
.text-xl   { font-size: 1.25rem;   line-height: 1.4; }  /* 20px */

/* Truncate */
.text-truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

/* Monospace */
.text-mono {
  font-family: ui-monospace, 'SF Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* Label style — used for form labels, section headings */
.text-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}


/* =============================================================================
   6. BACKGROUND UTILITIES
   ============================================================================= */

.bg-page      { background-color: var(--bg-page)      !important; }
.bg-card      { background-color: var(--bg-card)      !important; }
.bg-inset     { background-color: var(--bg-inset)     !important; }

.bg-primary   {
  background-color: var(--brand)           !important;
  color:            var(--text-on-brand)   !important;
}
.bg-secondary {
  background-color: var(--bg-card-raised)  !important;
  color:            var(--text-primary)    !important;
}
.bg-success   {
  background-color: var(--status-success)  !important;
  color:            #ffffff                !important;
}
.bg-warning   {
  background-color: var(--status-warning)  !important;
  color:            #ffffff                !important;
}
.bg-danger    {
  background-color: var(--status-error)    !important;
  color:            #ffffff                !important;
}
.bg-info      {
  background-color: var(--status-info)     !important;
  color:            #ffffff                !important;
}

/* Soft tinted backgrounds */
.bg-success-soft  { background-color: var(--status-success-bg) !important; }
.bg-warning-soft  { background-color: var(--status-warning-bg) !important; }
.bg-danger-soft   { background-color: var(--status-error-bg)   !important; }
.bg-info-soft     { background-color: var(--status-info-bg)    !important; }
.bg-brand-soft    { background-color: rgba(var(--brand-rgb), 0.08) !important; }


/* =============================================================================
   7. BADGES
   ============================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2xs);
  padding: 0.25rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
  border-radius: var(--radius-md);
  border: 1px solid transparent;

  /* Default neutral style */
  background-color: var(--bg-card-raised);
  border-color:     var(--border-default);
  color:            var(--text-muted);
}

/* Size modifiers */
.badge-sm {
  padding: 0.15rem 0.4rem;
  font-size: 0.6875rem;
  border-radius: var(--radius-sm);
}

.badge-md {
  padding: 0.35rem 0.7rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-md);
}

.badge-lg {
  padding: 0.5rem 1rem;
  font-size: 0.9375rem;
  border-radius: var(--radius-lg);
}

/* Pill shape */
.badge-pill {
  border-radius: var(--radius-full);
}

/* --- Status badge variants --- */

.badge-primary {
  background-color: rgba(var(--brand-rgb), 0.12);
  border-color:     rgba(var(--brand-rgb), 0.25);
  color:            var(--brand);
}

.badge-success {
  background-color: var(--status-success-bg);
  border-color:     rgba(16, 185, 129, 0.25);
  color:            var(--status-success-dark);
}

.badge-warning {
  background-color: var(--status-warning-bg);
  border-color:     rgba(245, 158, 11, 0.25);
  color:            var(--status-warning-dark);
}

.badge-danger {
  background-color: var(--status-error-bg);
  border-color:     rgba(239, 68, 68, 0.25);
  color:            var(--status-error-dark);
}

.badge-info {
  background-color: var(--status-info-bg);
  border-color:     rgba(59, 130, 246, 0.25);
  color:            var(--status-info-dark);
}

/* Solid badge variants — for higher emphasis */
.badge-primary-solid  { background-color: var(--brand);          border-color: var(--brand-dark);         color: #fff; }
.badge-success-solid  { background-color: var(--status-success); border-color: var(--status-success-dark); color: #fff; }
.badge-warning-solid  { background-color: var(--status-warning); border-color: var(--status-warning-dark); color: #fff; }
.badge-danger-solid   { background-color: var(--status-error);   border-color: var(--status-error-dark);   color: #fff; }
.badge-info-solid     { background-color: var(--status-info);    border-color: var(--status-info-dark);    color: #fff; }

/* Dot indicator inside a badge */
.badge-dot::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
  flex-shrink: 0;
}


/* =============================================================================
   8. RESPONSIVE TYPOGRAPHY
   ============================================================================= */

@media (max-width: 767.98px) {
  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.1rem; }
}

@media (max-width: 575.98px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }
  h3 { font-size: 1.15rem; }
}