/* Welcome Page Styles - White Theme */
/* Primary color: #1e293b (slate-800) */

/* Prevent Alpine.js x-cloak elements from flickering on page load */
[x-cloak] { display: none !important; }

/* Override the dark body from style.css */
body:has(.welcome-page) {
    background-color: #ffffff !important;
}

.welcome-page {
    background-color: #ffffff !important;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.welcome-page .welcome-main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;

}

/* Hide the default dark AppFooter on welcome page */
body:has(.welcome-page) > .font-sans > .welcome-page ~ footer,
body:has(.welcome-page) footer.d-none {
    display: none !important;
}

.welcome-page * {
    font-family: 'Inter', 'Open Sans', sans-serif;
}

/* Top Bar */
.welcome-topbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid #f0f0f0;
    padding: 16px 0;
    width: 100%;
    position: absolute;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.welcome-topbar .logo-img {
    height: 46px;
    object-fit: contain;
}

.welcome-topbar .topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.welcome-topbar .topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-login-outline {
    background: transparent;
    border: 1.5px solid #e2e8f0;
    color: #1e293b;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-login-outline:hover {
    border-color: #1e293b;
    color: #1e293b;
    text-decoration: none;
}

.btn-signup-primary {
    background: #1e293b;
    border: none;
    color: #ffffff;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.btn-signup-primary:hover {
    background: #0f172a;
    color: #ffffff;
    text-decoration: none;
}

/* Hero Section */
.welcome-hero {
    padding: 80px 0 60px;
}

.welcome-hero .hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.welcome-hero h1 {
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    color: #0f172a;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.welcome-hero h1 .highlight {
    position: relative;
    display: inline-block;
}

.welcome-hero h1 .highlight::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 4px;
    width: 100%;
    height: 12px;
    background: rgba(30, 41, 59, 0.15);
    border-radius: 4px;
    z-index: -1;
}

.welcome-hero .hero-subtitle {
    font-size: 17px;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 480px;
}

.welcome-hero .hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-get-started {
    background: #1e293b;
    color: #ffffff;
    border: none;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-get-started:hover {
    background: #0f172a;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.25);
}

.btn-get-started .arrow-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    font-size: 12px;
    transition: transform 0.2s ease;
}

.btn-get-started:hover .arrow-icon {
    transform: translateX(3px);
}

.btn-learn-resources {
    background: transparent;
    color: #1e293b;
    border: 1.5px solid #e2e8f0;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-learn-resources:hover {
    border-color: #1e293b;
    color: #1e293b;
    text-decoration: none;
}

/* Hero Image */
.welcome-hero .hero-right {
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-hero .hero-image-wrapper {
    position: relative;
    max-width: 520px;
    width: 100%;
}

.welcome-hero .hero-image-wrapper img {
    width: 100%;
    border-radius: 16px;
    object-fit: contain;
}

/* Stats floating card */
.hero-stat-card {
    position: absolute;
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: float 3s ease-in-out infinite;
}

.hero-stat-card.card-top {
    top: 10%;
    right: -20px;
}

.hero-stat-card.card-bottom {
    bottom: 15%;
    left: -20px;
    animation-delay: 1.5s;
}

.hero-stat-card .stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.hero-stat-card .stat-icon.blue {
    background: #f1f5f9;
    color: #1e293b;
}

.hero-stat-card .stat-icon.green {
    background: #f0fdf4;
    color: #16a34a;
}

.hero-stat-card .stat-text strong {
    display: block;
    font-size: 15px;
    color: #0f172a;
}

.hero-stat-card .stat-text span {
    font-size: 12px;
    color: #94a3b8;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

/* Partners Section */
.welcome-partners {
    padding: 40px 0;
    border-top: 1px solid #f1f5f9;
}

.welcome-partners .partners-label {
    font-size: 13px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 28px;
}

.partners-list {
    display: flex;
    align-items: center;
    gap: 48px;
    flex-wrap: wrap;
}

.partner-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #334155;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.partner-item:hover {
    opacity: 1;
}

.partner-item .partner-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
}

.partner-item .partner-logo-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: contain;
    background: #f8fafc;
    padding: 4px;
}

/* Welcome Footer */
.welcome-footer {
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    padding: 4px 0;
    flex-shrink: 0;
    margin-top: auto;
}

.welcome-footer .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.welcome-footer .footer-copy {
    font-size: 13px;
    color: #94a3b8;
}

.welcome-footer .footer-links a {
    font-size: 13px;
    color: #64748b;
    text-decoration: none;
    margin-left: 24px;
    transition: color 0.2s;
}

.welcome-footer .footer-links a:hover {
    color: #1e293b;
}

/* ===== AUTH MODAL ===== */
.auth-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-modal {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
    position: relative;
}

.auth-modal-header {
    padding: 28px 32px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.auth-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #64748b;
    transition: all 0.2s;
}

.auth-modal-close:hover {
    background: #e2e8f0;
    color: #0f172a;
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 0;
    padding: 0 32px;
    margin-top: 20px;
    border-bottom: 2px solid #f1f5f9;
}

.auth-tab {
    padding: 12px 0;
    margin-right: 32px;
    font-size: 15px;
    font-weight: 600;
    color: #94a3b8;
    border: none;
    background: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.auth-tab.active {
    color: #1e293b;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #1e293b;
    border-radius: 2px 2px 0 0;
}

.auth-tab:hover {
    color: #1e293b;
}

/* Form Body */
.auth-modal-body {
    padding: 28px 32px 32px;
}

.auth-form-group {
    margin-bottom: 18px;
}

.auth-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 6px;
}

.auth-form-group input,
.auth-form-group select {
    width: 100%;
    padding: 11px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 14px;
    color: #1e293b;
    background: #ffffff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.auth-form-group input:focus,
.auth-form-group select:focus {
    border-color: #1e293b;
    box-shadow: 0 0 0 3px rgba(30, 41, 59, 0.1);
}

.auth-form-group input::placeholder {
    color: #cbd5e1;
}

.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.auth-form-check {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.auth-form-check label {
    font-size: 13px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
}

.auth-form-check label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #1e293b;
}

.auth-form-check a {
    font-size: 13px;
    color: #1e293b;
    text-decoration: none;
    font-weight: 600;
}

.auth-form-check a:hover {
    text-decoration: underline;
}

.btn-auth-submit {
    width: 100%;
    background: #1e293b;
    color: #ffffff;
    border: none;
    padding: 13px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-auth-submit:hover {
    background: #0f172a;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.3);
}

/* OAuth */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-divider span {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-oauth {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 11px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 10px;
    text-decoration: none;
}

.btn-oauth:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    text-decoration: none;
    color: #1e293b;
}

.btn-oauth svg {
    width: 20px;
    height: 20px;
}

/* Validation Errors */
.auth-validation-errors {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
}

.auth-validation-errors p {
    font-size: 13px;
    font-weight: 600;
    color: #dc2626;
    margin-bottom: 4px;
}

.auth-validation-errors ul {
    margin: 0;
    padding-left: 18px;
}

.auth-validation-errors ul li {
    font-size: 12px;
    color: #dc2626;
}

/* Cookie Drawer */
.cookie-drawer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1e293b;
    color: #ffffff;
    padding: 16px 0;
    z-index: 9998;
    transform: translateY(0);
    transition: transform 0.3s ease;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

.cookie-drawer.hidden {
    transform: translateY(100%);
}

.cookie-drawer .cookie-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-drawer .cookie-text {
    font-size: 13px;
    color: #e2e8f0;
    line-height: 1.5;
    flex: 1;
    min-width: 200px;
}

.cookie-drawer .cookie-text a {
    color: #93c5fd;
    text-decoration: underline;
}

.cookie-drawer .cookie-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.btn-cookie-accept {
    background: #1e293b;
    color: #ffffff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cookie-accept:hover {
    background: #0f172a;
}

.btn-cookie-decline {
    background: transparent;
    color: #94a3b8;
    border: 1px solid #475569;
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cookie-decline:hover {
    color: #e2e8f0;
    border-color: #94a3b8;
}

/* Password Strength */
.password-strength {
    margin-top: 6px;
}

.password-strength-bar {
    height: 4px;
    border-radius: 2px;
    background: #e2e8f0;
    overflow: hidden;
    margin-bottom: 6px;
}

.password-strength-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background-color 0.3s ease;
    width: 0;
}

.password-strength-text {
    font-size: 11px;
    font-weight: 600;
}

.strength-weak { background: #ef4444; }
.strength-fair { background: #f59e0b; }
.strength-good { background: #22c55e; }
.strength-strong { background: #16a34a; }

.text-weak { color: #ef4444; }
.text-fair { color: #f59e0b; }
.text-good { color: #22c55e; }
.text-strong { color: #16a34a; }

.password-requirements {
    margin-top: 8px;
    padding: 0;
    list-style: none;
}

.password-requirements li {
    font-size: 11px;
    color: #94a3b8;
    padding: 1px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.password-requirements li.met {
    color: #22c55e;
}

.password-requirements li .req-icon {
    font-size: 10px;
    width: 14px;
    text-align: center;
}

/* Submit disabled state */
.btn-auth-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-auth-submit:disabled:hover {
    background: #94a3b8;
    box-shadow: none;
}

/* AJAX message display in modal */
.auth-ajax-message {
    border-radius: 10px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.6;
    text-align: center;
    display: none;
}

.auth-ajax-message.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    display: block;
}

.auth-ajax-message.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #16a34a;
    display: block;
}

.auth-ajax-message.info {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    display: block;
}

/* Loading state for buttons */
.btn-auth-submit.loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

/* Hide the legacy bootstrap modal and its backdrop on welcome page */
body:has(.welcome-page) #myModal,
body:has(.welcome-page) .modal-backdrop {
    display: none !important;
}

/* Disable the global page-loading overlay on welcome page */
body:has(.welcome-page).loading {
    overflow: visible !important;
}

body:has(.welcome-page) .page-loading {
    display: none !important;
}

.cookie-consent__message {
    display: none!important;
}

/* Responsive */
@media (max-width: 991px) {
    .welcome-hero {
        padding: 50px 0 40px;
    }
    .welcome-hero h1 {
        font-size: 36px;
    }
    .welcome-hero .hero-right {
        margin-top: 40px;
    }
    .hero-stat-card.card-top {
        right: 0;
    }
    .hero-stat-card.card-bottom {
        left: 0;
    }
}

@media (max-width: 767px) {
    .welcome-hero h1 {
        font-size: 30px;
        text-align: center;
    }
    .welcome-hero .hero-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
    .welcome-hero .hero-actions {
        justify-content: center;
    }
    .partners-list {
        justify-content: center;
        gap: 24px;
    }
    .welcome-partners .partners-label {
        text-align: center;
    }
    .welcome-topbar .topbar-inner {
        flex-wrap: wrap;
        gap: 12px;
        justify-content: center;
    }
    .hero-stat-card {
        display: none;
    }
    .auth-form-row {
        grid-template-columns: 1fr;
    }
    .auth-modal-body {
        padding: 24px 20px 28px;
    }
    .auth-tabs {
        padding: 0 20px;
    }
    .auth-modal-header {
        padding: 24px 20px 0;
    }
}
