/**
 * Vendor Login Stylesheet
 *
 * Styles for the vendor login page, matching the vendor-onboarding plugin design.
 * Uses 'vl-' prefix to avoid conflicts with other styles.
 *
 * @package Glitta_Theme
 * @subpackage Vendor_Login
 * @since 1.0.0
 */

:root {
    /* ----- Primary Colors ----- */
    --vl-primary-color: #ff8c42;        /* Orange - primary action color */
    --vl-primary-hover: #e67a35;        /* Darker orange for hover states */

    /* ----- Background Colors ----- */
    --vl-background: linear-gradient(180deg, #f8e8ff 0%, #ffffff 100%);
    --vl-background-color: #F4DBFF;     /* Lavender/pink background */
    --vl-card-bg: #ffffff;              /* White card background */

    /* ----- Text Colors ----- */
    --vl-text-primary: #1a1a2e;         /* Dark text - headings */
    --vl-text-secondary: #4B5563;       /* Gray text - body */
    --vl-text-muted: #6B7280;           /* Muted text - hints */

    /* ----- Border Colors ----- */
    --vl-border-color: #e5e7eb;         /* Light gray borders */
    --vl-input-border: #d1d5db;         /* Input field borders */
    --vl-input-focus: #ff8c42;          /* Input focus border */

    /* ----- State Colors ----- */
    --vl-error-color: #dc2626;          /* Red - error messages */
    --vl-error-bg: #fef2f2;             /* Light red - error background */
    --vl-success-color: #16a34a;        /* Green - success states */

    /* ----- Spacing Scale ----- */
    --vl-spacing-xs: 0.25rem;           /* 4px */
    --vl-spacing-sm: 0.5rem;            /* 8px */
    --vl-spacing-md: 1rem;              /* 16px */
    --vl-spacing-lg: 1.5rem;            /* 24px */
    --vl-spacing-xl: 2rem;              /* 32px */
    --vl-spacing-2xl: 3rem;             /* 48px */

    /* ----- Typography ----- */
    --vl-font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --vl-font-size-sm: 0.875rem;        /* 14px */
    --vl-font-size-base: 1rem;          /* 16px */
    --vl-font-size-lg: 1.125rem;        /* 18px */
    --vl-font-size-xl: 1.5rem;          /* 24px */
    --vl-font-size-2xl: 28px;           /* Card title */
    --vl-line-height: 1.5;

    /* ----- Border Radius ----- */
    --vl-radius-sm: 0.375rem;           /* 6px */
    --vl-radius-md: 0.5rem;             /* 8px */
    --vl-radius-lg: 1rem;               /* 16px */
    --vl-radius-xl: 1.5rem;             /* 24px */
    --vl-radius-full: 999px;            /* Pill shape */

    /* ----- Shadows ----- */
    --vl-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --vl-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --vl-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* ----- Transitions ----- */
    --vl-transition: all 0.2s ease-in-out;
}


/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */

/* Remove default margins/padding when using this template */
body.vendor-login-page,
html.vendor-login-page {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

body.vendor-login-page {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Box sizing for all elements */
.vl-page-wrapper *,
.vl-page-wrapper *::before,
.vl-page-wrapper *::after {
    box-sizing: border-box;
}


/* ==========================================================================
   3. Page Layout & Background
   ==========================================================================
   Main wrapper with decorative background pattern.
   ========================================================================== */

.vl-page-wrapper {
    min-height: 100vh;
    font-family: var(--vl-font-family);
    line-height: var(--vl-line-height);
    display: flex;
    flex-direction: column;
    padding-top: 0;
    position: relative;
}

/* Decorative background with gradient and pattern */
.vl-page-wrapper::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    /* Background color with SVG pattern overlay */
    background: var(--vl-background-color) url('../images/section-bg.svg') top center no-repeat;
    background-size: cover;
    pointer-events: none;
    z-index: 0;
}

/* Fallback if no SVG pattern available - uses solid gradient */
.vl-page-wrapper.vl-no-pattern::before {
    background: var(--vl-background);
}


/* ==========================================================================
   4. Header Styles
   ==========================================================================
   Capsule-style header matching vendor-onboarding design.
   ========================================================================== */

.vl-header {
    position: absolute;
    max-width: calc(100% - 40px);
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
    padding: 20px;
    box-sizing: border-box;
}

/* Capsule inner container with frosted glass effect */
.vl-header-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 72px;
    max-width: none;
    width: calc(100% - 64px);
    margin: 0 auto;
    padding: 0 40px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4.35px);
    -webkit-backdrop-filter: blur(4.35px);
    border-radius: var(--vl-radius-full);
    box-shadow: var(--vl-shadow-sm);
}

/* Logo link - removes default link styling */
.vl-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Logo image sizing */
.vl-glitta-logo {
    height: 65px;
    width: auto;
    display: block;
}

/* Fallback text logo if no image */
.vl-logo-text {
    font-family: 'Brush Script MT', cursive, sans-serif;
    font-size: 2rem;
    color: var(--vl-primary-color);
    text-decoration: none;
}


/* ==========================================================================
   5. Content Area
   ==========================================================================
   Container for the login card, centered below header.
   ========================================================================== */

.vl-content-area {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    width: 100%;
    padding-top: 150px;                 /* Space for header */
    padding-left: var(--vl-spacing-md);
    padding-right: var(--vl-spacing-md);
    padding-bottom: var(--vl-spacing-xl);
}


/* ==========================================================================
   6. Card Styles
   ==========================================================================
   White card container for the login form.
   ========================================================================== */

.vl-card {
    position: relative;
    z-index: 1;
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background: var(--vl-card-bg);
    border-radius: var(--vl-radius-xl);
    box-shadow: var(--vl-shadow-lg);
    padding: var(--vl-spacing-2xl);
}

/* Card header with title and subtitle */
.vl-card-header {
    text-align: center;
    margin-bottom: var(--vl-spacing-xl);
}

.vl-card-title {
    font-size: var(--vl-font-size-2xl);
    font-weight: 600;
    color: var(--vl-text-primary);
    margin: 0 0 var(--vl-spacing-sm);
}

.vl-card-subtitle {
    font-size: 16px;
    color: var(--vl-text-secondary);
    margin: 0;
    font-weight: 400;
    line-height: 1.5;
}


/* ==========================================================================
   7. Form Elements
   ==========================================================================
   Input fields, labels, and form layout.
   ========================================================================== */

.vl-form {
    display: flex;
    flex-direction: column;
    gap: var(--vl-spacing-lg);
}

/* Form group - contains label + input */
.vl-form-group {
    display: flex;
    flex-direction: column;
    gap: var(--vl-spacing-xs);
}

/* Label styling */
.vl-label {
    font-size: var(--vl-font-size-sm);
    font-weight: 600;
    color: var(--vl-text-primary);
}

/* Label row - for label with forgot password link */
.vl-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Forgot password link */
.vl-forgot-link {
    font-size: var(--vl-font-size-sm);
    color: var(--vl-text-secondary);
    text-decoration: none;
    transition: var(--vl-transition);
}

.vl-forgot-link:hover {
    color: var(--vl-primary-color);
}

/* Input field styling */
.vl-input {
    width: 100%;
    padding: var(--vl-spacing-md);
    font-size: var(--vl-font-size-base);
    font-family: var(--vl-font-family);
    color: var(--vl-text-primary);
    background: var(--vl-card-bg);
    border: 1px solid var(--vl-input-border);
    border-radius: var(--vl-radius-md);
    transition: var(--vl-transition);
    box-sizing: border-box;
}

.vl-input::placeholder {
    color: rgba(0, 0, 0, 0.35);
}

/* Input focus state */
.vl-input:focus {
    outline: none;
    border-color: var(--vl-input-focus);
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}

/* Input hover state */
.vl-input:hover:not(:focus) {
    border-color: #9ca3af;
}

/* Input error state */
.vl-input.vl-input-error {
    border-color: var(--vl-error-color);
}

.vl-input.vl-input-error:focus {
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

/* ----- Password Input Wrapper ----- */
.vl-password-wrapper {
    position: relative;
}

.vl-password-wrapper .vl-input {
    padding-right: 48px;               /* Space for toggle button */
}

/* Password visibility toggle button */
.vl-password-toggle {
    position: absolute;
    right: var(--vl-spacing-md);
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--vl-text-muted);
    padding: var(--vl-spacing-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--vl-transition);
}

.vl-password-toggle:hover {
    color: var(--vl-text-secondary);
}

.vl-password-toggle svg,
.vl-eye-icon {
    width: 20px;
    height: 20px;
}

/* ----- Checkbox Styling ----- */
.vl-checkbox-group {
    margin-top: var(--vl-spacing-sm);
}

.vl-checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--vl-spacing-sm);
    cursor: pointer;
    font-size: var(--vl-font-size-sm);
    color: var(--vl-text-secondary);
}

/* Hide native checkbox */
.vl-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom checkbox box */
.vl-checkbox-custom {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: var(--vl-card-bg);
    border: 2px solid var(--vl-input-border);
    border-radius: var(--vl-radius-sm);
    transition: var(--vl-transition);
    position: relative;
}

/* Checkbox checked state */
.vl-checkbox-label input[type="checkbox"]:checked + .vl-checkbox-custom {
    background: var(--vl-primary-color);
    border-color: var(--vl-primary-color);
}

/* Checkmark icon */
.vl-checkbox-label input[type="checkbox"]:checked + .vl-checkbox-custom::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Checkbox focus state */
.vl-checkbox-label input[type="checkbox"]:focus + .vl-checkbox-custom {
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.15);
}

.vl-checkbox-text {
    color: var(--vl-text-secondary);
}


/* ==========================================================================
   8. Button Styles
   ==========================================================================
   Primary action button for form submission.
   ========================================================================== */

.vl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--vl-spacing-md) var(--vl-spacing-xl);
    font-size: var(--vl-font-size-base);
    font-weight: 600;
    font-family: var(--vl-font-family);
    border-radius: var(--vl-radius-md);
    cursor: pointer;
    transition: var(--vl-transition);
    border: none;
    text-decoration: none;
}

/* Primary button - yellow background */
.vl-btn-primary {
    width: 100%;
    background: #FECC5A;
    border: 1px solid #D87907;
    color: #111827;
    font-family: 'Poppins', sans-serif;
}

.vl-btn-primary:hover,
.vl-btn-primary:focus {
    background: var(--vl-primary-hover);
}

.vl-btn-primary:disabled {
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    color: #9CA3AF;
    cursor: not-allowed;
}

/* Security note below button */
.vl-security-note {
    font-size: var(--vl-font-size-sm);
    color: var(--vl-text-muted);
    margin: var(--vl-spacing-md) 0 0;
    text-align: center;
}


/* ==========================================================================
   9. Error Messages
   ==========================================================================
   Error alert styling for login failures.
   ========================================================================== */

.vl-error-message {
    margin: var(--vl-spacing-xs) 0 0 0;
    padding: 0;
    color: var(--vl-error-color);
    font-size: var(--vl-font-size-sm);
}


/* ==========================================================================
   10. Footer Elements
   ==========================================================================
   Card footer and divider for registration link.
   ========================================================================== */

.vl-form-footer {
    text-align: center;
    margin-top: var(--vl-spacing-md);
}

.vl-divider {
    height: 1px;
    background: var(--vl-border-color);
    margin: var(--vl-spacing-lg) 0;
}

.vl-register-link {
    font-size: var(--vl-font-size-base);
    color: var(--vl-text-secondary);
    margin: 0;
}

.vl-register-link a {
    color: var(--vl-text-primary);
    font-weight: 600;
    text-decoration: underline;
    transition: var(--vl-transition);
}

.vl-register-link a:hover {
    color: var(--vl-primary-color);
}


/* ==========================================================================
   11. Responsive Design
   ==========================================================================
   Tablet and mobile adaptations.
   ========================================================================== */

/* ----- Tablet (max-width: 768px) ----- */
@media (max-width: 768px) {
    /* Fixed header on mobile */
    .vl-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        max-width: 100%;
        padding: 12px 16px;
        background: rgba(255, 255, 255, 0.98);
        border-bottom: 1px solid var(--vl-border-color);
        z-index: 100;
    }

    /* Remove capsule styling on mobile */
    .vl-header-inner {
        width: 100%;
        max-width: 100%;
        padding: 0;
        height: auto;
        background: transparent;
        backdrop-filter: none;
        border-radius: 0;
        box-shadow: none;
    }

    .vl-glitta-logo {
        height: 40px;
        width: auto;
    }

    /* Adjust content area padding */
    .vl-content-area {
        padding-top: 100px;
        padding-left: 16px;
        padding-right: 16px;
        padding-bottom: var(--vl-spacing-xl);
    }

    /* Card adjustments */
    .vl-card {
        max-width: 100%;
        padding: 24px 20px;
        border-radius: var(--vl-radius-lg);
    }
}

/* ----- Mobile (max-width: 576px) ----- */
@media (max-width: 576px) {
    .vl-header {
        padding: 10px 16px;
    }

    .vl-glitta-logo {
        height: 36px;
    }

    .vl-content-area {
        padding-top: 90px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .vl-card {
        padding: 20px 16px;
        border-radius: var(--vl-radius-md);
    }

    .vl-card-header {
        margin-bottom: var(--vl-spacing-lg);
    }

    .vl-card-title {
        font-size: 22px;
    }

    .vl-card-subtitle {
        font-size: 14px;
    }

    .vl-form {
        gap: var(--vl-spacing-md);
    }

    .vl-form-group {
        gap: 4px;
    }

    .vl-label {
        font-size: 13px;
    }

    /* Prevent iOS zoom on input focus */
    .vl-input {
        padding: 12px;
        font-size: 16px;
    }

    .vl-divider {
        margin: var(--vl-spacing-md) 0;
    }

    .vl-security-note {
        font-size: 12px;
    }

    .vl-register-link {
        font-size: 14px;
    }

    /* Label row stack on very small screens */
    .vl-label-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}


/* ==========================================================================
   12. Utility Classes
   ==========================================================================
   Helper classes for common patterns.
   ========================================================================== */

/* Screen reader only - for accessibility */
.vl-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Text alignment */
.vl-text-center {
    text-align: center;
}

/* Margin utilities */
.vl-mt-sm { margin-top: var(--vl-spacing-sm); }
.vl-mt-md { margin-top: var(--vl-spacing-md); }
.vl-mt-lg { margin-top: var(--vl-spacing-lg); }
.vl-mb-sm { margin-bottom: var(--vl-spacing-sm); }
.vl-mb-md { margin-bottom: var(--vl-spacing-md); }
.vl-mb-lg { margin-bottom: var(--vl-spacing-lg); }


/* ==========================================================================
   13. Glitta Footer Styles
   ==========================================================================
   Dark footer with multi-column layout.
   These styles are included here for self-containment.
   ========================================================================== */

.glitta-footer {
    background: #0c0c0c;
    color: #cfcfcf;
    font-family: var(--vl-font-family);
    position: relative;
    z-index: 2;
    width: 100%;
}

.glitta-footer-inner {
    max-width: none;
    margin: 0 auto;
    padding: 80px 40px 60px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 40px;
}

/* Footer brand column */
.footer-brand {
    max-width: 320px;
}

.footer-logo {
    height: 48px;
    margin-bottom: 20px;
}

.footer-tagline {
    font-size: 18px;
    line-height: 1.6;
    color: #bdbdbd;
}

/* Footer columns */
.footer-col h4.footer-title {
    color: #ffffff;
    font-size: 18px;
    margin-bottom: 18px;
    font-weight: 600;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 14px;
    font-size: 16px;
}

.footer-col ul li,
.footer-col ul li a {
    color: #bdbdbd;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col ul li a:hover {
    color: #ffffff;
}

/* Footer bottom bar */
.glitta-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: #0c0c0c;
}

.footer-bottom-inner {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #a8a8a8;
}

.footer-legal-links a {
    color: #cfcfcf;
    margin-left: 24px;
    text-decoration: none;
}

.footer-legal-links a:hover {
    color: #ffffff;
}

/* Footer responsive - Tablet */
@media (max-width: 1024px) {
    .glitta-footer-inner {
        grid-template-columns: 1fr 1fr;
    }
}

/* Footer responsive - Mobile */
@media (max-width: 600px) {
    .glitta-footer-inner {
        grid-template-columns: 1fr;
        padding: 60px 24px 40px;
    }

    .footer-bottom-inner {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer-legal-links a {
        margin-left: 12px;
        margin-right: 12px;
    }
}
