/**
 * Genius - Tema Principal
 * Réplica fiel do sistema original (Tailwind/React)
 * Cores baseadas em OKLCH convertidas para HEX/RGB
 */

:root {
    /* ==========================================
       Bootstrap CSS Variables Override
       ========================================== */
    --bs-primary: #14B8A6;
    --bs-primary-rgb: 20, 184, 166;
    --bs-link-color: #14B8A6;
    --bs-link-color-rgb: 20, 184, 166;
    --bs-link-hover-color: #0D9488;
    --bs-link-hover-color-rgb: 13, 148, 136;
    
    /* ==========================================
       Custom Theme Variables
       ========================================== */
    /* Primary: Genius Turquoise - oklch(0.65 0.12 180) */
    --primary: #14B8A6;
    --primary-hover: #0D9488;
    --primary-foreground: #FFFFFF;
    --primary-light: rgba(20, 184, 166, 0.1);
    --primary-shadow: rgba(20, 184, 166, 0.3);
    
    /* Accent: Darker turquoise - oklch(0.55 0.12 180) */
    --accent: #0D9488;
    --accent-foreground: #FFFFFF;
    
    /* Background - oklch(0.98 0 0) */
    --background: #FAFAFA;
    --foreground: #1A1A2E;
    
    /* Card - oklch(0.99 0 0) */
    --card: #FFFFFF;
    --card-foreground: #1A1A2E;
    
    /* Secondary - oklch(0.95 0.01 240) */
    --secondary: #F1F5F9;
    --secondary-foreground: #334155;
    
    /* Muted - oklch(0.93 0.01 240) */
    --muted: #E2E8F0;
    --muted-foreground: #64748B;
    
    /* Border - oklch(0.88 0.01 240) */
    --border: #E2E8F0;
    --input: #E2E8F0;
    --ring: #14B8A6;
    
    /* Destructive */
    --destructive: #EF4444;
    --destructive-foreground: #FFFFFF;
    
    /* Sidebar */
    --sidebar: #FFFFFF;
    --sidebar-foreground: #334155;
    --sidebar-border: #E2E8F0;
    
    /* Radius */
    --radius: 0.75rem;
    --radius-sm: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Gray Scale (Tailwind) */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    
    /* Teal Scale (Primary variations) */
    --teal-50: #F0FDFA;
    --teal-100: #CCFBF1;
    --teal-200: #99F6E4;
    --teal-300: #5EEAD4;
    --teal-400: #2DD4BF;
    --teal-500: #14B8A6;
    --teal-600: #0D9488;
    --teal-700: #0F766E;
    --teal-800: #115E59;
    --teal-900: #134E4A;
    
    /* Mode Colors */
    --mode-quick-doubt-bg: #FEF3C7;
    --mode-quick-doubt-text: #B45309;
    --mode-quick-doubt-border: #FDE68A;
    --mode-quick-doubt-gradient: linear-gradient(135deg, #F59E0B, #F97316);
    
    --mode-exam-prep-bg: #DBEAFE;
    --mode-exam-prep-text: #1D4ED8;
    --mode-exam-prep-border: #BFDBFE;
    --mode-exam-prep-gradient: linear-gradient(135deg, #3B82F6, #6366F1);
    
    --mode-revision-bg: #D1FAE5;
    --mode-revision-text: #047857;
    --mode-revision-border: #A7F3D0;
    --mode-revision-gradient: linear-gradient(135deg, #10B981, #14B8A6);
    
    --mode-free-learning-bg: #F3E8FF;
    --mode-free-learning-text: #7C3AED;
    --mode-free-learning-border: #DDD6FE;
    --mode-free-learning-gradient: linear-gradient(135deg, #8B5CF6, #EC4899);
}

/* Dark theme */
.dark {
    --primary: #14B8A6;
    --primary-foreground: #FFFFFF;
    --background: #0F172A;
    --foreground: #F8FAFC;
    --card: #1E293B;
    --card-foreground: #F8FAFC;
    --secondary: #334155;
    --secondary-foreground: #F8FAFC;
    --muted: #334155;
    --muted-foreground: #94A3B8;
    --border: #334155;
    --input: #334155;
    --sidebar: #1E293B;
    --sidebar-foreground: #F8FAFC;
    --sidebar-border: #334155;
}

/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings - Playfair Display */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    line-height: 1.3;
}

/* Links - Base styles (will be overridden by Bootstrap classes) */
a {
    color: #14B8A6;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0D9488;
}

/* Prevent horizontal overflow */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Mobile scrollbar hiding */
@media (max-width: 1023px) {
    ::-webkit-scrollbar {
        display: none;
    }
    
    * {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    
    body {
        overscroll-behavior-y: contain;
    }
}

/* Touch feedback */
@media (hover: none) and (pointer: coarse) {
    button, a, [role="button"] {
        -webkit-tap-highlight-color: transparent;
    }
}

/* Custom scrollbar for desktop */
@media (min-width: 1024px) {
    ::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }
    
    ::-webkit-scrollbar-track {
        background: #F3F4F6;
        border-radius: 6px;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #D1D5DB;
        border-radius: 6px;
        border: 2px solid #F3F4F6;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: #9CA3AF;
    }
}

/* Firefox scrollbar */
* {
    scrollbar-width: auto;
    scrollbar-color: #D1D5DB #F3F4F6;
}

/* ==========================================
   Bootstrap Overrides & Custom Styles
   ========================================== */

/* 
 * IMPORTANT: These overrides ensure our custom teal color (#14B8A6) 
 * takes precedence over Bootstrap's default blue primary color.
 * Bootstrap uses --bs-primary-rgb which we override in :root above.
 * Using high specificity selectors to override Bootstrap's !important
 */

/* Primary color - Force override Bootstrap's .text-primary */
.text-primary,
span.text-primary,
a.text-primary,
p.text-primary,
h1 .text-primary,
h2 .text-primary,
h3 .text-primary,
h4 .text-primary,
h5 .text-primary,
h6 .text-primary,
div .text-primary,
i.text-primary,
.bi.text-primary,
[class*="text-primary"] {
    --bs-text-opacity: 1;
    color: #14B8A6 !important;
}

/* Background primary */
.bg-primary,
div.bg-primary,
span.bg-primary,
[class*="bg-primary"] {
    --bs-bg-opacity: 1;
    background-color: #14B8A6 !important;
}

/* Border primary */
.border-primary,
div.border-primary,
.card.border-primary,
[class*="border-primary"] {
    --bs-border-opacity: 1;
    border-color: #14B8A6 !important;
}

/* Links */
a {
    color: #14B8A6;
}

a:hover {
    color: #0D9488;
}

/* Bootstrap link classes */
.link-primary,
a.link-primary {
    color: #14B8A6 !important;
}

.link-primary:hover,
.link-primary:focus,
a.link-primary:hover,
a.link-primary:focus {
    color: #0D9488 !important;
}

/* Text colors matching Tailwind */
.text-gray-300 { color: #D1D5DB !important; }
.text-gray-400 { color: #9CA3AF !important; }
.text-gray-500 { color: #6B7280 !important; }
.text-gray-600 { color: #4B5563 !important; }
.text-gray-700 { color: #374151 !important; }
.text-gray-800 { color: #1F2937 !important; }
.text-gray-900 { color: #111827 !important; }

/* Background colors */
.bg-gray-50 { background-color: #F9FAFB !important; }
.bg-gray-100 { background-color: #F3F4F6 !important; }
.bg-gray-800 { background-color: #1F2937 !important; }
.bg-gray-900 { background-color: #111827 !important; }
.bg-black { background-color: #000000 !important; }

/* Button styling - Primary */
.btn-primary,
.btn-primary.btn-primary {
    --bs-btn-bg: #14B8A6;
    --bs-btn-border-color: #14B8A6;
    --bs-btn-hover-bg: #0D9488;
    --bs-btn-hover-border-color: #0D9488;
    --bs-btn-active-bg: #0F766E;
    --bs-btn-active-border-color: #0F766E;
    --bs-btn-disabled-bg: #14B8A6;
    --bs-btn-disabled-border-color: #14B8A6;
    background-color: #14B8A6 !important;
    border-color: #14B8A6 !important;
    color: white !important;
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.3);
    transition: all 0.2s ease;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary.btn-primary:hover,
.btn-primary.btn-primary:focus {
    background-color: #0D9488 !important;
    border-color: #0D9488 !important;
    color: white !important;
    box-shadow: 0 15px 30px rgba(20, 184, 166, 0.3);
}

.btn-primary:active,
.btn-primary.btn-primary:active {
    background-color: #0F766E !important;
    border-color: #0F766E !important;
}

/* Button styling - Outline Primary */
.btn-outline-primary,
.btn-outline-primary.btn-outline-primary {
    --bs-btn-color: #14B8A6;
    --bs-btn-border-color: #14B8A6;
    --bs-btn-hover-bg: #14B8A6;
    --bs-btn-hover-border-color: #14B8A6;
    --bs-btn-active-bg: #0D9488;
    --bs-btn-active-border-color: #0D9488;
    color: #14B8A6 !important;
    border-color: #14B8A6 !important;
    background-color: transparent !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary.btn-outline-primary:hover,
.btn-outline-primary.btn-outline-primary:focus {
    background-color: #14B8A6 !important;
    border-color: #14B8A6 !important;
    color: white !important;
}

/* Button styling - Outline Secondary (gray border) */
.btn-outline-secondary {
    color: #374151 !important;
    border-color: #D1D5DB !important;
    background-color: transparent !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background-color: #F3F4F6 !important;
    border-color: #9CA3AF !important;
    color: #111827 !important;
}

/* Button styling - Light (white background) */
.btn-light {
    background-color: white !important;
    border-color: white !important;
    color: #14B8A6 !important;
}

.btn-light:hover,
.btn-light:focus {
    background-color: #F3F4F6 !important;
    border-color: #F3F4F6 !important;
    color: #14B8A6 !important;
}

/* Button sizes */
.btn {
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Card styling */
.card {
    border-radius: var(--radius-lg);
    border-color: var(--border);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.card.shadow-sm {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card.shadow-sm:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Card with primary border (popular plan) */
.card.border-primary {
    border-color: #14B8A6 !important;
    box-shadow: 0 10px 40px rgba(20, 184, 166, 0.2);
}

/* Navbar styling */
.navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand img {
    transition: transform 0.2s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    color: #374151 !important;
    transition: color 0.2s ease, background-color 0.2s ease;
    border-radius: var(--radius);
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: #14B8A6 !important;
    background-color: rgba(20, 184, 166, 0.05);
}

.nav-link.active,
.nav-link.text-primary {
    color: #14B8A6 !important;
}

/* Footer link hover */
.hover-primary:hover {
    color: #14B8A6 !important;
}

/* Display headings with Inter font for better readability */
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    color: #111827;
}

/* Lead text */
.lead {
    color: #4B5563;
}

/* Text muted - use gray-600 like Tailwind */
.text-muted {
    color: #4B5563 !important;
}

/* Text secondary - use gray-500 */
.text-secondary {
    color: #6B7280 !important;
}

/* Smooth transitions */
.card, .btn, a {
    transition: all 0.2s ease;
}

/* Avatar circle */
.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 184, 166, 0.1);
    color: #14B8A6;
    font-weight: 600;
    font-size: 14px;
}

/* Form controls */
.form-control,
.form-select {
    border-color: #E2E8F0;
    border-radius: var(--radius);
}

.form-control:focus,
.form-select:focus {
    border-color: #14B8A6;
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.25);
}

/* Dropdown menu */
.dropdown-menu {
    border-radius: var(--radius);
    border: 1px solid #E2E8F0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    color: #374151;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background-color: rgba(20, 184, 166, 0.1);
    color: #14B8A6;
}

/* Badge */
.badge {
    font-weight: 500;
}

.badge.bg-primary {
    background-color: #14B8A6 !important;
}

/* Accordion */
.accordion-button {
    color: #111827;
}

.accordion-button:not(.collapsed) {
    background-color: rgba(20, 184, 166, 0.1);
    color: #14B8A6;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(20, 184, 166, 0.25);
    border-color: #14B8A6;
}

/* Icon colors */
.bi.text-primary {
    color: #14B8A6 !important;
}

/* Gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #14B8A6, #0D9488) !important;
}

/* Shadow utilities */
.shadow-primary {
    box-shadow: 0 10px 25px rgba(20, 184, 166, 0.3) !important;
}

/* Border radius utilities */
.rounded-2xl {
    border-radius: var(--radius-xl) !important;
}

.rounded-3xl {
    border-radius: var(--radius-2xl) !important;
}

/* Opacity utilities */
.opacity-75 {
    opacity: 0.75 !important;
}

.opacity-90 {
    opacity: 0.9 !important;
}

/* Gap utilities for flexbox */
.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-5 { gap: 1.25rem !important; }

/* Icon container styling */
.icon-container {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 184, 166, 0.1);
}

.icon-container i,
.icon-container svg {
    color: #14B8A6;
}

/* CTA Section gradient */
.cta-gradient {
    background: linear-gradient(135deg, #14B8A6, #0D9488);
}

/* Footer styling */
footer {
    background-color: white;
    border-top: 1px solid #E2E8F0;
}

footer a {
    color: #4B5563;
    transition: color 0.2s ease;
}

footer a:hover {
    color: #14B8A6;
}

/* Popular badge styling */
.badge-popular {
    background: linear-gradient(135deg, #14B8A6, #0D9488);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Check/X icons in plan features */
.bi-check-lg.text-primary {
    color: #14B8A6 !important;
}

.bi-x-lg.text-muted {
    color: #9CA3AF !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .display-6 {
        font-size: 1.5rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}
