/* Elite Legal Strategy Portal - Custom Styles */

:root {
    /* ELS Brand Colors - from their actual website */
    --els-primary: #348081;      /* color-1: teal */
    --els-secondary: #0a2e4c;    /* color-2: dark blue */
    --els-accent: #ebaa3f;       /* color-3: gold */
    --els-success: #348081;      /* using primary for success */
    --els-warning: #ebaa3f;      /* using gold for warning */
    --els-danger: #c02b0a;       /* red from forms */
    --els-light: #f5f5f5;        /* gray-light */
    --els-dark: #171717;         /* dark-gray */
    --els-white: #ffffff;
    --els-black: #000000;
    
    /* ELS Gold variants */
    --els-gold-light: #fdc47d;
    --els-gold-darken: #b2613d;
    --els-gold-custom: #fcc37d;
    
    /* ELS Grays */
    --els-gray: rgba(0,0,0,0.5);
    --els-gray-sidebar: #fcfcfc;
    --els-subtle-white: rgba(255,255,255,0.25);
    --els-subtle-black: rgba(0,0,0,0.25);
    --els-transluscent: rgba(30,30,30,0.9);
    
    /* Standard grays for compatibility */
    --els-gray-50: #f9fafb;
    --els-gray-100: #f3f4f6;
    --els-gray-200: #e5e7eb;
    --els-gray-300: #d1d5db;
    --els-gray-400: #9ca3af;
    --els-gray-500: #6b7280;
    --els-gray-600: #4b5563;
    --els-gray-700: #374151;
    --els-gray-800: #1f2937;
    --els-gray-900: #111827;
    
    /* ELS Typography */
    --els-heading-font: "Antonio", sans-serif;
    --els-text-font: "Montserrat", sans-serif;
    --els-anton-font: "Anton", sans-serif;
    
    /* ELS Font sizes */
    --els-fsize-xl: clamp(35px, 8vw, 55px);
    --els-fsize-lg: clamp(25px, 6vw, 40px);
    --els-fsize-md: clamp(20px, 4vw, 30px);
    --els-fsize-sm: clamp(18px, 3vw, 20px);
    --els-fsize-default: clamp(16px, 1vw, 22px);
}

/* Global Styles */
html {
    height: 100%;
}

body {
    font-family: var(--els-text-font), -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--els-fsize-default);
    line-height: 1.5;
    color: var(--els-dark);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--els-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

/* Main content area */
.main-content {
    flex: 1;
    padding-top: 1rem;
    padding-bottom: 2rem;
}

/* Page loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-content {
    text-align: center;
}

/* ELS Navigation - matching their website style */
.els-navbar {
    background: linear-gradient(0deg, rgba(249,214,158,1) 0%, rgba(191,132,64,1) 4%, rgba(0,0,0,1) 5%, rgba(0,0,0,1) 75%);
    transition: all 0.3s ease;
    padding: 10px 15px;
}

.els-navbar .navbar-brand {
    font-family: var(--els-heading-font);
    font-weight: normal;
    font-size: min(18px, 1.2vw);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    color: var(--els-white) !important;
}

/* Mobile-specific navbar brand sizing */
@media (max-width: 768px) {
    .els-navbar .navbar-brand {
        font-size: 24px !important;
    }
}

.els-navbar .navbar-brand:hover {
    background: linear-gradient(135deg, var(--els-gold-light) 0%, var(--els-gold-darken) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transform: scale(1.02);
}

.els-navbar .nav-link {
    font-family: var(--els-heading-font);
    font-weight: normal;
    font-size: min(16px, 1.2vw);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 0 2px;
    padding: 0 0.5em !important;
    color: var(--els-white) !important;
}

/* Mobile-specific nav link sizing */
@media (max-width: 768px) {
    .els-navbar .nav-link {
        font-size: 18px !important;
    }
}

.els-navbar .nav-link:hover {
    background-color: var(--els-subtle-white);
    color: var(--els-gold-custom) !important;
}

.els-navbar .navbar-toggler {
    border: none;
    font-size: 22px;
    transform: scaleX(1.75);
    outline-color: var(--els-primary);
    color: var(--els-white);
}

/* ELS Navbar brand icon styling */
.els-navbar .navbar-brand i {
    color: var(--els-gold-light);
    transition: color 0.25s ease;
}

.els-navbar .navbar-brand:hover i {
    color: var(--els-gold-custom);
}

.dropdown-menu {
    border: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.dropdown-item {
    font-family: var(--els-heading-font);
    font-weight: normal;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 2px 8px;
    width: calc(100% - 16px);
}

/* Mobile-specific dropdown item sizing */
@media (max-width: 768px) {
    .dropdown-item {
        font-size: 16px !important;
        padding: 12px 16px !important;
    }
}

.dropdown-item:hover {
    background-color: var(--els-gray-100);
    color: var(--els-primary);
}

/* ELS Typography - matching their website */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--els-heading-font);
    line-height: 1.25;
    margin-bottom: 0.5em;
    font-weight: normal;
}

h1 {
    font-size: var(--els-fsize-xl);
}

h2 {
    font-size: var(--els-fsize-lg);
    text-transform: uppercase;
}

h3 {
    font-size: var(--els-fsize-md);
}

h4 {
    font-size: var(--els-fsize-sm);
}

/* ELS Links - matching their hover behavior */
a {
    color: var(--els-primary);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--els-gold-custom);
}

/* ELS Button Styles - inspired by their website */
.btn-els {
    font-family: var(--els-text-font);
    overflow: hidden;
    font-size: clamp(14px, 3vw, 16px);
    letter-spacing: -0.055em;
    font-weight: 500;
    line-height: 1;
    color: var(--els-white);
    min-width: clamp(170px, 40vw, 224px);
    min-height: 50px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 1px solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(to left, var(--els-gold-darken), var(--els-gold-light), var(--els-gold-darken));
    width: fit-content;
    transition: background-color 0.3s, border-image-source 0.3s, color 0.3s;
    position: relative;
    background-color: transparent;
}

.btn-els:hover {
    border-color: var(--els-gold-light);
    color: var(--els-black);
    border-image-source: linear-gradient(to left, var(--els-gold-light), var(--els-gold-light), var(--els-gold-light));
    background-color: var(--els-gold-light);
}

/* ELS Text Gradient - matching their website */
.text-els-gradient {
    background: linear-gradient(90deg, var(--els-gold-light) 0%, var(--els-gold-darken) 50%, var(--els-gold-light) 68%, var(--els-gold-darken) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
}

.alert-warning {
    background-color: #fffbeb;
    color: #a16207;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
}

/* Toast notifications */
.toast {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.toast-header {
    background-color: transparent;
    border-bottom: 1px solid var(--els-gray-200);
}

/* Breadcrumb styling */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin: 0 0 1rem 0;
}

.breadcrumb-item a {
    color: var(--els-gray-600);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--els-primary);
}

.breadcrumb-item.active {
    color: var(--els-gray-800);
    font-weight: 500;
}

/* Footer enhancements */
.footer {
    background-color: white;
    border-top: 1px solid var(--els-gray-200);
    margin-top: auto;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Button Styles */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background-color: var(--els-secondary);
    border-color: var(--els-secondary);
    transform: translateY(-1px);
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 1px solid #d1d5db;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    border-color: var(--els-secondary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Dashboard Styles */
.dashboard-card {
    background: linear-gradient(135deg, var(--els-primary) 0%, var(--els-secondary) 100%);
    color: white;
    border-radius: 16px;
    padding: 2rem;
}

.dashboard-card h3 {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.subscription-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.subscription-badge.essentials {
    background-color: var(--els-success);
    color: white;
}

.subscription-badge.executive {
    background-color: var(--els-warning);
    color: white;
}

.calls-remaining {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
}

/* Action Buttons */
.action-btn {
    display: block;
    width: 100%;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 12px;
    border: none;
    background: white;
    color: var(--els-dark);
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: var(--els-primary);
}

.action-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--els-secondary);
}

.action-btn h5 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.action-btn p {
    margin: 0;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.3s ease;
    background-color: #f9fafb;
}

.upload-area:hover,
.upload-area.dragover {
    border-color: var(--els-secondary);
    background-color: var(--els-light);
}

.upload-area i {
    font-size: 3rem;
    color: var(--els-secondary);
    margin-bottom: 1rem;
}

/* Progress Bar */
.progress {
    height: 8px;
    border-radius: 4px;
    background-color: #e5e7eb;
}

.progress-bar {
    border-radius: 4px;
    background-color: var(--els-success);
    transition: width 0.3s ease;
}

/* Alert Styles */
.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
}

/* Footer */
footer {
    border-top: 1px solid #e5e7eb;
}

footer a {
    text-decoration: none;
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--els-primary) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-card {
        padding: 1.5rem;
    }
    
    .calls-remaining {
        font-size: 2rem;
    }
    
    .action-btn {
        padding: 1rem;
    }
    
    .action-btn i {
        font-size: 1.5rem;
    }
    
    /* Mobile dashboard layout improvements */
    .els-dashboard-hero .row {
        text-align: center;
    }
    
    .els-dashboard-hero .col-lg-8 {
        margin-bottom: 2rem;
    }
    
    .els-calls-display {
        margin-bottom: 1rem;
        text-align: center;
    }
    
    .els-calls-number {
        font-size: 2.5rem !important;
    }
    
    .els-calls-label {
        font-size: 0.9rem !important;
        line-height: 1.2;
    }
    
    /* Ensure proper spacing between consultation and document displays on mobile */
    .col-12.col-md-6:first-child {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile service card animations - show gold border and effects on mobile */
    .els-action-card {
        /* Ensure the gold border is visible on mobile */
        border-top: 4px solid transparent;
        background: linear-gradient(180deg, 
            linear-gradient(90deg, var(--els-gold-darken), var(--els-gold-light), var(--els-gold-darken)) 0%,
            white 4px);
        background-clip: padding-box;
    }
    
    .els-action-card::before {
        /* Show gold border on mobile by default */
        transform: scaleX(1);
        opacity: 0.8;
    }
    
    /* Mobile touch effects */
    .els-action-card:active {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    }
    
    .els-action-card:active .els-action-icon {
        color: var(--els-accent);
    }
    
    /* Add subtle animation for mobile */
    .els-action-card {
        animation: mobileCardPulse 2s ease-in-out infinite;
    }
    
    @keyframes mobileCardPulse {
        0%, 100% { 
            transform: translateY(0);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        50% { 
            transform: translateY(-2px);
            box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
        }
    }
}

@media (max-width: 576px) {
    /* Extra small mobile devices */
    .els-dashboard-hero h1 {
        font-size: 1.75rem;
    }
    
    .els-calls-number {
        font-size: 2rem !important;
    }
    
    .els-calls-label {
        font-size: 0.8rem !important;
    }
    
    .els-tier-badge {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }
    
    /* Extra small mobile service card optimizations */
    .els-action-card {
        padding: 1.5rem;
        animation: mobileCardPulse 3s ease-in-out infinite;
    }
    
    .els-action-icon {
        font-size: 2.5rem;
    }
    
    .els-action-title {
        font-size: 0.9rem;
    }
    
    .els-action-desc {
        font-size: 0.8rem;
    }
}

/* Loading States */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
