/**
 * Wayflo Tours – Maps Consent Gate Styles
 * v5.16.0
 */

.wayflo-maps-gate {
    position: absolute;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, #f7f3ed 0%, #ede5d8 100%);
    box-sizing: border-box;
}

.wayflo-maps-gate[hidden] {
    display: none !important;
}

.wayflo-maps-gate.is-visible {
    animation: wayfloGateFadeIn 220ms ease-out;
}

.wayflo-maps-gate.is-leaving {
    animation: wayfloGateFadeOut 240ms ease-in forwards;
}

@keyframes wayfloGateFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes wayfloGateFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .wayflo-maps-gate.is-visible,
    .wayflo-maps-gate.is-leaving {
        animation: none;
    }
}

/* === Card === */

.wayflo-maps-gate-card {
    max-width: 420px;
    width: 100%;
    background: #ffffff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(42, 124, 111, 0.12),
                0 2px 8px rgba(0, 0, 0, 0.04);
    box-sizing: border-box;
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

.wayflo-maps-gate-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(42, 124, 111, 0.08);
    color: var(--vsf-accent, #2a7c6f);
    margin-bottom: 16px;
}

.wayflo-maps-gate-title {
    font-family: 'DM Serif Display', 'Instrument Serif', Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.25;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.wayflo-maps-gate-body {
    font-size: 14px;
    line-height: 1.55;
    color: #555;
    margin: 0 0 22px 0;
}

/* === Actions === */

.wayflo-maps-gate-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.wayflo-maps-gate-btn {
    appearance: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 10px;
    transition: background 160ms ease, transform 120ms ease, box-shadow 160ms ease;
    min-height: 44px; /* a11y touch target */
    width: 100%;
    max-width: 280px;
}

.wayflo-maps-gate-btn-primary {
    background: var(--vsf-primary, #2a7c6f);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(42, 124, 111, 0.25);
}

.wayflo-maps-gate-btn-primary:hover:not(:disabled) {
    background: #226658;
    box-shadow: 0 4px 12px rgba(42, 124, 111, 0.35);
}

.wayflo-maps-gate-btn-primary:active:not(:disabled) {
    transform: translateY(1px);
}

.wayflo-maps-gate-btn-primary:focus-visible {
    outline: 3px solid var(--vsf-gold, #b8956a);
    outline-offset: 2px;
}

.wayflo-maps-gate-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.wayflo-maps-gate-link {
    color: #6b7280;
    text-decoration: underline;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
}

.wayflo-maps-gate-link:hover {
    color: var(--vsf-accent, #2a7c6f);
}

.wayflo-maps-gate-link:focus-visible {
    outline: 2px solid var(--vsf-gold, #b8956a);
    outline-offset: 2px;
}

.wayflo-maps-gate-hint {
    font-size: 12px;
    color: #999;
    margin: 18px 0 0 0;
    line-height: 1.4;
}

.wayflo-maps-gate-error {
    margin: 16px 0 0 0;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}

/* === Mobile === */

@media (max-width: 480px) {
    .wayflo-maps-gate {
        padding: 16px;
    }
    .wayflo-maps-gate-card {
        padding: 24px 20px 20px;
    }
    .wayflo-maps-gate-title {
        font-size: 19px;
    }
    .wayflo-maps-gate-body {
        font-size: 13.5px;
    }
}

/* === High-contrast / forced-colors === */

@media (forced-colors: active) {
    .wayflo-maps-gate-card {
        border: 1px solid CanvasText;
    }
    .wayflo-maps-gate-btn-primary {
        border: 2px solid ButtonText;
    }
}
