/**
 * Legislative Maps — Styles
 *
 * Covers: teaser, OTP gate, tabbed maps, upsell, responsive
 * All classes use uwc-legmap- prefix.
 *
 * @package UWC_CRM
 * @since   2.8.0
 */

/* =========================================================================
   Variables
   ========================================================================= */
:root {
    --legmap-uc-color: #16a34a;        /* Green-600 for Unemployment Compensation */
    --legmap-wc-color: #2563eb;        /* Blue-600 for Workers' Compensation */
    --legmap-primary: #1d4ed8;         /* Blue-700 for buttons */
    --legmap-primary-hover: #1e40af;   /* Blue-800 */
    --legmap-gray-50: #f9fafb;
    --legmap-gray-100: #f3f4f6;
    --legmap-gray-200: #e5e7eb;
    --legmap-gray-300: #d1d5db;
    --legmap-gray-400: #9ca3af;
    --legmap-gray-500: #6b7280;
    --legmap-gray-600: #4b5563;
    --legmap-gray-700: #374151;
    --legmap-gray-800: #1f2937;
    --legmap-gray-900: #111827;
    --legmap-red-600: #dc2626;
    --legmap-green-600: #16a34a;
}

/* =========================================================================
   Page Container
   ========================================================================= */
.uwc-legmap-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* =========================================================================
   Header (Maps Page)
   ========================================================================= */
.uwc-legmap-header {
    text-align: center;
    margin-bottom: 28px;
}

.uwc-legmap-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--legmap-gray-900);
    margin: 0 0 8px;
}

.uwc-legmap-subtitle {
    font-size: 15px;
    color: var(--legmap-gray-500);
    margin: 0;
    line-height: 1.6;
}

/* =========================================================================
   Teaser (Homepage — two-column layout)
   ========================================================================= */
.uwc-legmap-teaser {
    background-color: #dce8f4;
    padding: 60px 40px;
    width: 100%;
}

.uwc-legmap-teaser-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 60px;
}

.uwc-legmap-teaser-content {
    flex: 1;
    min-width: 0;
}

.uwc-legmap-teaser-title {
    font-size: 40px;
    font-weight: 700;
    margin: 0 0 20px;
    color: #1a2340;
    line-height: 1.15;
}

.uwc-legmap-teaser-desc {
    font-size: 16px;
    margin: 0 0 28px;
    color: #3a4560;
    line-height: 1.7;
}

.uwc-legmap-teaser-btn {
    display: inline-block !important;
    padding: 14px 32px !important;
    background-color: #4a3880 !important;
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.uwc-legmap-teaser-btn:hover {
    background-color: #3b2d68 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}

.uwc-legmap-teaser-image-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uwc-legmap-teaser-img {
    display: block;
    width: 100%;
    max-width: 520px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* =========================================================================
   Buttons
   ========================================================================= */
.uwc-legmap-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    cursor: pointer;
    border: none !important;
    transition: background-color 0.15s, box-shadow 0.15s, color 0.15s;
    line-height: 1.4;
}

.uwc-legmap-btn-primary {
    background-color: var(--legmap-primary) !important;
    color: #ffffff !important;
}

.uwc-legmap-btn-primary:hover,
.uwc-legmap-btn-primary:focus {
    background-color: var(--legmap-primary-hover) !important;
    box-shadow: 0 2px 8px rgba(29, 78, 216, 0.35);
    color: #ffffff !important;
    text-decoration: none !important;
}

.uwc-legmap-btn-primary:visited {
    color: #ffffff !important;
}

.uwc-legmap-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.uwc-legmap-btn-full {
    width: 100%;
}

/* =========================================================================
   Tabs
   ========================================================================= */
.uwc-legmap-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--legmap-gray-200);
    margin-bottom: 0;
}

.uwc-legmap-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    font-size: 15px;
    font-weight: 600;
    color: var(--legmap-gray-500);
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.uwc-legmap-tab:hover {
    color: var(--legmap-gray-700);
}

.uwc-legmap-tab--uc.uwc-legmap-tab--active {
    color: var(--legmap-uc-color);
    border-bottom-color: var(--legmap-uc-color);
}

.uwc-legmap-tab--wc.uwc-legmap-tab--active {
    color: var(--legmap-wc-color);
    border-bottom-color: var(--legmap-wc-color);
}

/* Tab color dots */
.uwc-legmap-tab-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.uwc-legmap-tab-dot--uc {
    background-color: var(--legmap-uc-color);
}

.uwc-legmap-tab-dot--wc {
    background-color: var(--legmap-wc-color);
}

/* =========================================================================
   Panels (Iframe Containers)
   ========================================================================= */
.uwc-legmap-panels {
    border: 1px solid var(--legmap-gray-200);
    border-top: none;
    border-radius: 0 0 8px 8px;
    overflow: hidden;
    background: #ffffff;
}

.uwc-legmap-panel {
    /* Hidden by default; JS toggles display */
}

.uwc-legmap-iframe {
    display: block;
    width: 100%;
    min-height: 800px;
    border: none;
    border-radius: 0;
}

/* =========================================================================
   OTP Gate
   ========================================================================= */
.uwc-legmap-otp-gate {
    max-width: 480px;
    margin: 40px auto;
}

.uwc-legmap-message {
    background: #ffffff;
    border: 1px solid var(--legmap-gray-200);
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
}

.uwc-legmap-message-icon {
    margin-bottom: 16px;
    color: var(--legmap-primary);
}

.uwc-legmap-message-icon svg {
    stroke: currentColor;
}

.uwc-legmap-message h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--legmap-gray-900);
    margin: 0 0 12px;
}

.uwc-legmap-message p {
    font-size: 14px;
    color: var(--legmap-gray-600);
    line-height: 1.6;
    margin: 0 0 20px;
}

/* OTP Form */
.uwc-legmap-otp-form {
    text-align: left;
    margin-bottom: 16px;
}

.uwc-legmap-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--legmap-gray-700);
    margin-bottom: 6px;
}

.uwc-legmap-input {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid var(--legmap-gray-300);
    border-radius: 8px;
    margin-bottom: 12px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.uwc-legmap-input:focus {
    border-color: var(--legmap-primary);
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.uwc-legmap-otp-field {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 6px;
    text-align: center;
    font-family: monospace;
}

/* Status Messages */
.uwc-legmap-status {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-top: 12px;
    text-align: center;
}

.uwc-legmap-status-error {
    background: #fef2f2;
    color: var(--legmap-red-600);
    border: 1px solid #fecaca;
}

.uwc-legmap-status-success {
    background: #f0fdf4;
    color: var(--legmap-green-600);
    border: 1px solid #bbf7d0;
}

/* Timer */
.uwc-legmap-otp-timer {
    font-size: 13px;
    color: var(--legmap-gray-400);
    text-align: center;
    margin: 8px 0;
}

/* Alt links */
.uwc-legmap-otp-alt {
    font-size: 13px;
    color: var(--legmap-gray-400);
    text-align: center;
    margin: 12px 0 0;
}

.uwc-legmap-otp-alt a {
    color: var(--legmap-primary) !important;
    text-decoration: none !important;
}

.uwc-legmap-otp-alt a:hover {
    text-decoration: underline !important;
    color: var(--legmap-primary-hover) !important;
}

/* =========================================================================
   Upsell
   ========================================================================= */
.uwc-legmap-upsell {
    max-width: 560px;
    margin: 40px auto;
}

.uwc-legmap-upsell h2 {
    font-size: 24px;
}

.uwc-legmap-upsell-features {
    text-align: left;
    margin: 0 0 24px;
}

.uwc-legmap-upsell-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.uwc-legmap-upsell-features li {
    position: relative;
    padding: 6px 0 6px 24px;
    font-size: 14px;
    color: var(--legmap-gray-700);
    line-height: 1.5;
}

.uwc-legmap-upsell-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--legmap-green-600);
    font-weight: 700;
}

.uwc-legmap-upsell-cta {
    border-top: 1px solid var(--legmap-gray-100);
    padding-top: 20px;
    margin-top: 4px;
}

.uwc-legmap-upsell-cta p {
    margin: 0 0 12px;
}

.uwc-legmap-upsell-cta .uwc-legmap-btn {
    margin-top: 8px;
}

/* =========================================================================
   Registration Form (domain-match flow)
   ========================================================================= */
.uwc-legmap-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 0;
}

.uwc-legmap-form-row {
    margin-bottom: 12px;
}

.uwc-legmap-form-grid .uwc-legmap-form-row {
    margin-bottom: 0;
}

.uwc-legmap-form-row .uwc-legmap-input {
    margin-bottom: 0;
}

.uwc-legmap-required {
    color: var(--legmap-red-600);
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 640px) {
    .uwc-legmap-page {
        padding: 12px;
    }

    .uwc-legmap-title {
        font-size: 22px;
    }

    .uwc-legmap-tabs {
        flex-direction: column;
    }

    .uwc-legmap-tab {
        border-bottom: none;
        border-left: 3px solid transparent;
        margin-bottom: 0;
        justify-content: flex-start;
        padding: 12px 16px;
    }

    .uwc-legmap-tab--uc.uwc-legmap-tab--active {
        border-left-color: var(--legmap-uc-color);
        border-bottom-color: transparent;
    }

    .uwc-legmap-tab--wc.uwc-legmap-tab--active {
        border-left-color: var(--legmap-wc-color);
        border-bottom-color: transparent;
    }

    .uwc-legmap-iframe {
        min-height: 500px;
    }

    .uwc-legmap-otp-gate {
        margin: 20px auto;
    }

    .uwc-legmap-message {
        padding: 28px 20px;
    }

    .uwc-legmap-teaser {
        padding: 40px 20px;
    }

    .uwc-legmap-teaser-inner {
        flex-direction: column;
        gap: 32px;
    }

    .uwc-legmap-teaser-title {
        font-size: 28px;
    }

    .uwc-legmap-teaser-desc {
        font-size: 15px;
    }

    .uwc-legmap-teaser-image-wrap {
        order: -1;
    }

    .uwc-legmap-form-grid {
        grid-template-columns: 1fr;
    }
}
