/*
 * Horizon Theme — RainBuckets.AI
 * Brand-aligned palette: Blue (#1d4ed8) + Green (#22c55e)
 * Nav: deep blue; Primary actions: blue; Accent: green
 */

:root[data-theme="horizon"] {
    /* ═══════════════════════════════════════════════════════════════
       PRIMARY COLOR PALETTE (Blue — from brand "buckets.ai")
       ═══════════════════════════════════════════════════════════════ */
    --theme-primary: #1d4ed8;
    --theme-primary-dark: #1e40af;
    --theme-primary-light: #3b82f6;
    --theme-primary-gradient: linear-gradient(135deg, #1e40af 0%, #1d4ed8 100%);

    /* Secondary (Green — from brand "rain") */
    --theme-secondary: #22c55e;
    --theme-secondary-dark: #16a34a;
    --theme-secondary-light: #4ade80;

    /* ═══════════════════════════════════════════════════════════════
       TEXT COLORS
       ═══════════════════════════════════════════════════════════════ */
    --theme-text-primary: #1F2937;
    --theme-text-secondary: #4B5563;
    --theme-text-muted: #9CA3AF;
    --theme-text-inverse: #FFFFFF;

    /* ═══════════════════════════════════════════════════════════════
       BACKGROUND COLORS
       ═══════════════════════════════════════════════════════════════ */
    --theme-bg-primary: #FFFFFF;
    --theme-bg-secondary: #F8FAFC;
    --theme-bg-accent: #EFF6FF;
    --theme-bg-hero: linear-gradient(180deg, #EFF6FF 0%, #FFFFFF 100%);

    /* ═══════════════════════════════════════════════════════════════
       NAVIGATION (deep blue — brand-derived)
       ═══════════════════════════════════════════════════════════════ */
    --theme-nav-bg: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    --theme-nav-text: #FFFFFF;
    --theme-nav-hover: rgba(255, 255, 255, 0.15);
    --theme-nav-border: #E5E7EB;
    --theme-nav-height: 60px;

    /* ═══════════════════════════════════════════════════════════════
       FOOTER
       ═══════════════════════════════════════════════════════════════ */
    --theme-footer-bg: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
    --theme-footer-text: #FFFFFF;

    /* ═══════════════════════════════════════════════════════════════
       CARDS & COMPONENTS
       ═══════════════════════════════════════════════════════════════ */
    --theme-card-bg: #FFFFFF;
    --theme-card-border: #E5E7EB;
    --theme-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --theme-card-shadow-hover: 0 4px 12px rgba(29, 78, 216, 0.15);

    /* ═══════════════════════════════════════════════════════════════
       BUTTONS - PRIMARY
       ═══════════════════════════════════════════════════════════════ */
    --theme-btn-primary-bg: #1d4ed8;
    --theme-btn-primary-text: #FFFFFF;
    --theme-btn-primary-hover: #1e40af;

    /* BUTTONS - SECONDARY */
    --theme-btn-secondary-bg: #FFFFFF;
    --theme-btn-secondary-text: #1d4ed8;
    --theme-btn-secondary-border: #1d4ed8;

    /* ═══════════════════════════════════════════════════════════════
       STATUS COLORS
       ═══════════════════════════════════════════════════════════════ */
    --theme-success: #10B981;
    --theme-success-dark: #059669;
    --theme-success-light: #34D399;
    --theme-warning: #F59E0B;
    --theme-warning-dark: #D97706;
    --theme-warning-light: #FBBF24;
    --theme-danger: #EF4444;
    --theme-danger-dark: #DC2626;
    --theme-danger-light: #F87171;

    /* STATUS BUTTONS */
    --theme-btn-success-bg: #10B981;
    --theme-btn-success-text: #FFFFFF;
    --theme-btn-success-hover: #059669;
    --theme-btn-warning-bg: #F59E0B;
    --theme-btn-warning-text: #1F2937;
    --theme-btn-warning-hover: #D97706;
    --theme-btn-danger-bg: #EF4444;
    --theme-btn-danger-text: #FFFFFF;
    --theme-btn-danger-hover: #DC2626;

    /* ═══════════════════════════════════════════════════════════════
       ICONS & FEATURES
       ═══════════════════════════════════════════════════════════════ */
    --theme-icon-bg: #EFF6FF;
    --theme-icon-color: #1d4ed8;
    --theme-checkmark-color: #10B981;

    /* ═══════════════════════════════════════════════════════════════
       BORDERS & SPACING
       ═══════════════════════════════════════════════════════════════ */
    --theme-border-color: #E5E7EB;
    --theme-border-radius: 8px;
    --theme-border-radius-sm: 6px;
    --theme-border-radius-lg: 12px;

    /* Spacing */
    --theme-spacing-xs: 0.25rem;
    --theme-spacing-sm: 0.5rem;
    --theme-spacing-md: 1rem;
    --theme-spacing-lg: 1.5rem;
    --theme-spacing-xl: 2rem;
    --theme-spacing-2xl: 3rem;
    --theme-spacing-3xl: 4rem;

    /* ═══════════════════════════════════════════════════════════════
       TYPOGRAPHY
       ═══════════════════════════════════════════════════════════════ */
    --theme-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --theme-font-size-xs: 0.75rem;
    --theme-font-size-sm: 0.875rem;
    --theme-font-size-base: 1rem;
    --theme-font-size-lg: 1.125rem;
    --theme-font-size-xl: 1.5rem;
    --theme-font-size-2xl: 2rem;
    --theme-font-size-3xl: 2.5rem;

    /* ═══════════════════════════════════════════════════════════════
       TRANSITIONS & SHADOWS
       ═══════════════════════════════════════════════════════════════ */
    --theme-transition-fast: 0.15s ease;
    --theme-transition-base: 0.2s ease;
    --theme-transition-slow: 0.3s ease;

    --theme-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --theme-shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --theme-shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --theme-shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════
   BOOTSTRAP BUTTON OVERRIDES
   ═══════════════════════════════════════════════════════════════════════ */

/* Primary Buttons */
:root[data-theme="horizon"] .btn-primary {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #FFFFFF !important;
}

:root[data-theme="horizon"] .btn-primary:hover,
:root[data-theme="horizon"] .btn-primary:focus {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
}

/* Secondary Buttons */
:root[data-theme="horizon"] .btn-secondary {
    background-color: #6B7280 !important;
    border-color: #6B7280 !important;
    color: #FFFFFF !important;
}

:root[data-theme="horizon"] .btn-secondary:hover,
:root[data-theme="horizon"] .btn-secondary:focus {
    background-color: #4B5563 !important;
    border-color: #4B5563 !important;
}

/* Danger Buttons */
:root[data-theme="horizon"] .btn-danger {
    background-color: #EF4444 !important;
    border-color: #EF4444 !important;
    color: #FFFFFF !important;
}

:root[data-theme="horizon"] .btn-danger:hover,
:root[data-theme="horizon"] .btn-danger:focus {
    background-color: #DC2626 !important;
    border-color: #DC2626 !important;
}

/* Success Buttons */
:root[data-theme="horizon"] .btn-success {
    background-color: #10B981 !important;
    border-color: #10B981 !important;
    color: #FFFFFF !important;
}

:root[data-theme="horizon"] .btn-success:hover,
:root[data-theme="horizon"] .btn-success:focus {
    background-color: #059669 !important;
    border-color: #059669 !important;
}

/* Warning Buttons */
:root[data-theme="horizon"] .btn-warning {
    background-color: #F59E0B !important;
    border-color: #F59E0B !important;
    color: #1F2937 !important;
}

:root[data-theme="horizon"] .btn-warning:hover,
:root[data-theme="horizon"] .btn-warning:focus {
    background-color: #D97706 !important;
    border-color: #D97706 !important;
}

/* Info Buttons */
:root[data-theme="horizon"] .btn-info {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #FFFFFF !important;
}

:root[data-theme="horizon"] .btn-info:hover,
:root[data-theme="horizon"] .btn-info:focus {
    background-color: #1e40af !important;
    border-color: #1e40af !important;
}

/* Outline Primary */
:root[data-theme="horizon"] .btn-outline-primary {
    color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    background-color: transparent !important;
}

:root[data-theme="horizon"] .btn-outline-primary:hover,
:root[data-theme="horizon"] .btn-outline-primary:focus {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #FFFFFF !important;
}

/* Outline Secondary */
:root[data-theme="horizon"] .btn-outline-secondary {
    color: #4B5563 !important;
    border-color: #9CA3AF !important;
    background-color: transparent !important;
}

:root[data-theme="horizon"] .btn-outline-secondary:hover,
:root[data-theme="horizon"] .btn-outline-secondary:focus {
    background-color: #4B5563 !important;
    border-color: #4B5563 !important;
    color: #FFFFFF !important;
}

/* Outline Danger */
:root[data-theme="horizon"] .btn-outline-danger {
    color: #EF4444 !important;
    border-color: #EF4444 !important;
    background-color: transparent !important;
}

:root[data-theme="horizon"] .btn-outline-danger:hover,
:root[data-theme="horizon"] .btn-outline-danger:focus {
    background-color: #EF4444 !important;
    border-color: #EF4444 !important;
    color: #FFFFFF !important;
}

/* Outline Success */
:root[data-theme="horizon"] .btn-outline-success {
    color: #10B981 !important;
    border-color: #10B981 !important;
    background-color: transparent !important;
}

:root[data-theme="horizon"] .btn-outline-success:hover,
:root[data-theme="horizon"] .btn-outline-success:focus {
    background-color: #10B981 !important;
    border-color: #10B981 !important;
    color: #FFFFFF !important;
}

/* Outline Warning */
:root[data-theme="horizon"] .btn-outline-warning {
    color: #D97706 !important;
    border-color: #F59E0B !important;
    background-color: transparent !important;
}

:root[data-theme="horizon"] .btn-outline-warning:hover,
:root[data-theme="horizon"] .btn-outline-warning:focus {
    background-color: #F59E0B !important;
    border-color: #F59E0B !important;
    color: #1F2937 !important;
}

/* Outline Info */
:root[data-theme="horizon"] .btn-outline-info {
    color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    background-color: transparent !important;
}

:root[data-theme="horizon"] .btn-outline-info:hover,
:root[data-theme="horizon"] .btn-outline-info:focus {
    background-color: #1d4ed8 !important;
    border-color: #1d4ed8 !important;
    color: #FFFFFF !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   NAVIGATION OVERRIDES
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] .theme-nav {
    box-shadow: 0 2px 4px rgba(29, 78, 216, 0.15);
}

:root[data-theme="horizon"] .theme-nav a,
:root[data-theme="horizon"] .theme-nav .nav-link,
:root[data-theme="horizon"] .navbar a,
:root[data-theme="horizon"] nav.top-navbar a {
    color: #FFFFFF !important;
}

:root[data-theme="horizon"] .theme-nav .section-dropdown-menu a,
:root[data-theme="horizon"] .theme-nav .user-dropdown-menu a,
:root[data-theme="horizon"] .theme-nav .alert-dropdown-menu a,
:root[data-theme="horizon"] nav .section-dropdown-menu a,
:root[data-theme="horizon"] nav .user-dropdown-menu a,
:root[data-theme="horizon"] nav .alert-dropdown-menu a {
    color: #212529 !important;
}

:root[data-theme="horizon"] .theme-nav a:hover,
:root[data-theme="horizon"] .theme-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #FFFFFF !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   LINK STYLING
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] a:not(.btn):not(.nav-link):not(.navbar-brand):not([class*="btn-"]) {
    color: #1d4ed8;
}

:root[data-theme="horizon"] a:not(.btn):not(.nav-link):not(.navbar-brand):not([class*="btn-"]):hover {
    color: #1e40af;
}

/* ═══════════════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] .hero-highlight,
:root[data-theme="horizon"] .theme-hero-title {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

:root[data-theme="horizon"] .btn-hero-primary,
:root[data-theme="horizon"] .btn-cta-primary {
    background: #1d4ed8 !important;
    color: #FFFFFF !important;
}

:root[data-theme="horizon"] .btn-hero-primary:hover,
:root[data-theme="horizon"] .btn-cta-primary:hover {
    background: #1e40af !important;
    color: #FFFFFF !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   BREADCRUMBS
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] .breadcrumb {
    background-color: transparent;
}

:root[data-theme="horizon"] .breadcrumb-item a {
    color: #4B5563 !important;
}

:root[data-theme="horizon"] .breadcrumb-item a:hover {
    color: #1d4ed8 !important;
}

:root[data-theme="horizon"] .breadcrumb-item.active {
    color: #1F2937 !important;
}

:root[data-theme="horizon"] .breadcrumb-item + .breadcrumb-item::before {
    color: #9CA3AF;
}

/* ═══════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] .table th {
    background-color: #F9FAFB;
    border-color: #E5E7EB;
    color: #1F2937;
}

:root[data-theme="horizon"] .table-hover tbody tr:hover {
    background-color: #EFF6FF;
}

/* ═══════════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] input:focus,
:root[data-theme="horizon"] select:focus,
:root[data-theme="horizon"] textarea:focus,
:root[data-theme="horizon"] .form-control:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.15);
}

/* ═══════════════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] .badge.bg-primary,
:root[data-theme="horizon"] .badge-primary {
    background-color: #1d4ed8 !important;
    color: #FFFFFF !important;
}

:root[data-theme="horizon"] .badge.bg-secondary,
:root[data-theme="horizon"] .badge-secondary {
    background-color: #6B7280 !important;
    color: #FFFFFF !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] .alert-info {
    background-color: #EFF6FF;
    border-color: #1d4ed8;
    color: #1e40af;
}

:root[data-theme="horizon"] .alert-success {
    background-color: #ECFDF5;
    border-color: #10B981;
    color: #059669;
}

/* ═══════════════════════════════════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] .theme-card:hover,
:root[data-theme="horizon"] .card:hover {
    border-color: #1d4ed8;
}

/* ═══════════════════════════════════════════════════════════════════════
   SCROLLBARS (WebKit)
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

:root[data-theme="horizon"] ::-webkit-scrollbar-track {
    background: #F3F4F6;
}

:root[data-theme="horizon"] ::-webkit-scrollbar-thumb {
    background: #1d4ed8;
    border-radius: 4px;
}

:root[data-theme="horizon"] ::-webkit-scrollbar-thumb:hover {
    background: #1e40af;
}

/* ═══════════════════════════════════════════════════════════════════════
   SELECTION
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] ::selection {
    background-color: rgba(29, 78, 216, 0.2);
    color: #1F2937;
}

/* ═══════════════════════════════════════════════════════════════════════
   PROGRESS BARS
   ═══════════════════════════════════════════════════════════════════════ */

:root[data-theme="horizon"] .progress-bar {
    background-color: #1d4ed8;
}
