/* Site-wide terms modal (footer link) */
html.site-terms-modal-open,
body.site-terms-modal-open {
    overflow: hidden;
}

html.site-terms-modal-open {
    scroll-behavior: auto !important;
}

body.site-terms-modal-open {
    width: 100%;
    touch-action: none;
}

.site-terms-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10050;
    padding: 16px;
}

.site-terms-overlay.is-open {
    display: flex;
}

.site-terms-modal {
    width: 100%;
    max-width: 640px;
    max-height: 80vh;
    border-radius: 16px;
    padding: 18px 18px 16px;
    background: radial-gradient(120% 120% at 50% 50%, #2a364b 0%, #121e36 100%);
    border: 2px solid var(--alfa-grey-2);
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.9);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.site-terms-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    gap: 12px;
    padding-right: 36px;
}

.site-terms-modal-header h2 {
    font-family: 'Urbanist', sans-serif;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--text-primary);
    text-align: center;
    margin: 0;
}

.site-terms-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-primary);
    border-radius: 8px;
    min-width: 32px;
    min-height: 32px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
    transition: color 0.3s, text-shadow 0.3s;
}

.site-terms-close:hover,
.site-terms-close:active {
    color: var(--white-100);
    text-shadow: 0 0 10px rgba(22, 223, 253, 0.85), 0 0 22px rgba(22, 223, 253, 0.6), 0 0 36px rgba(22, 223, 253, 0.4);
}

.site-terms-close:focus-visible {
    outline: none;
    color: var(--white-100);
    text-shadow: 0 0 10px rgba(22, 223, 253, 0.85), 0 0 22px rgba(22, 223, 253, 0.6), 0 0 36px rgba(22, 223, 253, 0.4);
}

.site-terms-modal-body {
    margin-top: 4px;
    flex: 1 1 auto;
    padding: 10px 17px;
    border-radius: 16px;
    background: #121e36;
    overflow: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--alfa-grey-2) transparent;
}

.site-terms-modal-body::-webkit-scrollbar {
    width: 4px;
}

.site-terms-modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.site-terms-modal-body::-webkit-scrollbar-thumb {
    background: var(--alfa-grey-2);
    border-radius: 2px;
}

.site-terms-text {
    white-space: pre-wrap;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    line-height: 24px;
    color: var(--text-primary);
    padding: 0;
    margin: 0;
}

.site-terms-modal-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.site-terms-btn-close {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 24px;
    padding: 10px 20px;
    border-radius: 8px;
    border: 1px solid var(--alfa-grey-2);
    background: transparent;
    color: var(--white-100);
    cursor: pointer;
    transition: color 0.12s ease-out, text-shadow 0.12s ease-out, border-color 0.12s ease-out;
}

.site-terms-btn-close:hover {
    border-color: rgba(22, 223, 253, 0.5);
    color: var(--white-100);
    text-shadow: 0 0 10px rgba(22, 223, 253, 0.5);
}

.site-terms-btn-accept {
    font-family: 'Urbanist', sans-serif;
    font-weight: 700;
    font-size: 14px;
    line-height: 24px;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background-color: var(--bg-brand-dark, #e6007d);
    color: #fff;
    box-shadow: inset 6px 8px 9px 0px #ff1597, inset -6px -8px 9px 0px #ff1597;
}

.site-terms-btn-accept:hover {
    filter: brightness(1.08);
}

@media (max-width: 480px) {
    .site-terms-modal-header h2 {
        font-size: 18px;
    }
}
