/* ============================================================
   МОДАЛЬНОЕ ОКНО (modal-styles.css)
   ============================================================ */

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 101001;
    background: rgba(6,4,2,.7);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity .3s;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal {
    width: 100%;
    max-width: 420px;
    background: #14110d;
    border: 1px solid rgba(255,255,255,.14);
    border-radius: 20px;
    padding: 36px 34px;
    transform: translateY(20px);
    transition: transform .3s;
    position: relative;
}

.modal-overlay.show .modal {
    transform: translateY(0);
}

.modal .close {
    position: absolute;
    top: 0;
    right: 0;
    background: none;
    border: none;
    color: rgba(255,255,255,.55);
    font-size: 20px;
    cursor: pointer;
    padding: 6px;
    transition: color .2s;
}

.modal .close:hover {
    color: #fff;
}

.modal h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    position: relative;
}

.modal h2 .close {
    top: -4px;
}

.modal .sub {
    font-size: 14px;
    color: rgba(255,255,255,.65);
    line-height: 1.5;
    margin-bottom: 24px;
}

.modal label {
    display: block;
    font-size: 13px;
    color: rgba(255,255,255,.7);
    margin-bottom: 8px;
    font-weight: 500;
}

.modal input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.16);
    color: #fff;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: border-color .25s;
    margin-bottom: 18px;
}

.modal input:focus {
    outline: none;
    border-color: var(--blue-l);
}

.modal input::placeholder {
    color: rgba(255,255,255,.4);
}

.modal .submit {
    width: 100%;
    padding: 15px;
    border: none;
    border-radius: 12px;
    background: var(--blue);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background .25s, transform .25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.modal .submit:hover {
    background: var(--blue-l);
    transform: translateY(-2px);
}

.modal .done {
    text-align: center;
    padding: 12px 0;
}

.modal .done i {
    font-size: 46px;
    color: var(--success);
    margin-bottom: 16px;
}

.modal .done h2 {
    margin-bottom: 8px;
}

.modal .err {
    color: #ff8d8d;
    font-size: 13px;
    margin: -8px 0 14px;
    min-height: 16px;
}

/* ============================================================
   АДАПТИВНОСТЬ ДЛЯ МОДАЛЬНОГО ОКНА
   ============================================================ */

@media (max-width: 480px) {
    .modal {
        padding: 28px 20px;
    }
    
    .modal h2 {
        font-size: 22px;
    }
    
    .modal .close {
        font-size: 18px;
        padding: 4px;
    }
}


/* ============================================================
   СОГЛАСИЕ НА ОБРАБОТКУ ПД (внутри модального окна)
   ============================================================ */

/* Блок согласия */
.consent-block {
    margin: 16px 0 20px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Лейбл для чекбокса */
.consent-block label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
    margin-bottom: 0;
    padding: 0;
}

/* Скрываем стандартный чекбокс */
.consent-block input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
}

/* Кастомный чекбокс (квадрат) */
.consent-block .custom-checkbox {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    position: relative;
}

/* Состояние :hover */
.consent-block label:hover .custom-checkbox {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

/* Состояние :checked (галочка) */
.consent-block input[type="checkbox"]:checked + .custom-checkbox {
    background: var(--blue, #2a7de1);
    border-color: var(--blue, #2a7de1);
}

/* Галочка внутри (SVG или псевдоэлемент) */
.consent-block input[type="checkbox"]:checked + .custom-checkbox::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 0px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Ссылки внутри согласия */
.consent-block a {
    color: var(--blue, #2a7de1);
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    transition: color 0.2s;
}

.consent-block a:hover {
    color: var(--blue-l, #5a9df5);
}

/* Текст согласия (основной) */
.consent-block .consent-text {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.5;
}

/* Подсказка-предупреждение (звёздочка) */
.consent-block .consent-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 8px;
    padding-left: 30px;
}

.consent-block .consent-hint .star {
    color: #ff6b6b;
    font-weight: 600;
}

/* Состояние ошибки (если чекбокс не отмечен) */
.consent-block.error {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.08);
}

.consent-block.error .custom-checkbox {
    border-color: #ff6b6b;
}

.consent-block .error-message {
    display: none;
    font-size: 12px;
    color: #ff6b6b;
    margin-top: 6px;
    padding-left: 30px;
}

.consent-block.error .error-message {
    display: block;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

@media (max-width: 480px) {
    .consent-block {
        padding: 12px 14px;
        margin: 12px 0 16px;
    }

    .consent-block label {
        font-size: 12px;
        gap: 8px;
    }

    .consent-block .custom-checkbox {
        width: 18px;
        height: 18px;
        margin-top: 1px;
    }

    .consent-block input[type="checkbox"]:checked + .custom-checkbox::after {
        left: 4px;
        top: 0px;
        width: 5px;
        height: 10px;
    }

    .consent-block .consent-text {
        font-size: 12px;
    }

    .consent-block .consent-hint {
        font-size: 11px;
        padding-left: 26px;
    }
}

/* ============================================================
   ДОПОЛНИТЕЛЬНО: ДЛЯ ТЕМНОЙ ТЕМЫ (если нужна светлая)
   ============================================================ */

/* Если модальное окно светлое — раскомментируйте и настройте */
/*
.consent-block.light {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}

.consent-block.light .consent-text {
    color: rgba(0, 0, 0, 0.8);
}

.consent-block.light .custom-checkbox {
    border-color: rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.05);
}

.consent-block.light .consent-hint {
    color: rgba(0, 0, 0, 0.5);
}

.consent-block.light a {
    color: #1a5bbf;
}
*/