/* Legal links bar (Privacy Policy / Cookies / Disclaimer) — mobile first */
.legal-links-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 16px;
    background: rgb(255, 255, 255);
    border-top: 1px solid rgb(217, 217, 217);
    text-align: center;
}

.legal-links-bar__link {
    background: none;
    border: none;
    margin: 0;
    padding: 4px 0;
    cursor: pointer;
    color: rgb(38, 38, 38);
    font-family: "Helvetica Bold", Arial, sans-serif;
    font-size: 13px;
    line-height: 17px;
    text-decoration: underline;
}

.legal-links-bar__link:hover,
.legal-links-bar__link:focus-visible {
    color: #cc0000;
}

@media (min-width: 640px) {
    .legal-links-bar {
        flex-direction: row;
        justify-content: center;
        gap: 35px;
    }
}

/* Modal overlay — mobile first */
.legal-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(15, 23, 42, 0.6);
    padding: 16px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.legal-modal-overlay.is-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.legal-modal {
    width: 100%;
    max-width: 100%;
    margin-top: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    animation: legalModalIn 0.22s ease forwards;
}

@keyframes legalModalIn {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.legal-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    background: #002b49;
    border-bottom: 3px solid #cc0000;
}

.legal-modal__title {
    margin: 0;
    color: #fff;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}

.legal-modal__close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: #fff;
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.legal-modal__close:hover,
.legal-modal__close:focus-visible {
    background: rgba(255, 255, 255, 0.15);
    color: #cc0000;
}

.legal-modal__body {
    padding: 20px;
    max-height: 65vh;
    overflow-y: auto;
    color: #1a202c;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

.legal-modal__body p {
    margin: 0 0 12px;
}

.legal-modal__body p:last-child {
    margin-bottom: 0;
}

body.legal-modal-locked {
    overflow: hidden;
}

/* Tablet and up */
@media (min-width: 480px) {
    .legal-modal-overlay.is-open {
        align-items: center;
    }

    .legal-modal-overlay {
        padding: 24px;
    }

    .legal-modal {
        margin-top: 0;
    }
}

@media (min-width: 640px) {
    .legal-modal {
        max-width: 560px;
    }

    .legal-modal__title {
        font-size: 19px;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .legal-modal {
        max-width: 640px;
    }

    .legal-modal__body {
        padding: 24px 28px;
        font-size: 15px;
    }
}
