/**
 * agreement.css - Стили для модального окна пользовательского соглашения
 * Версия: 1.0
 */

/* ================================================================ */
/* МОДАЛЬНОЕ ОКНО СОГЛАШЕНИЯ                                        */
/* ================================================================ */

.agreement-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 50000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: agreementFadeIn 0.3s ease;
}

@keyframes agreementFadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.agreement-modal-container {
    background: linear-gradient(145deg, #0f1724, #0a0f18);
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    border-radius: 28px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: agreementScaleIn 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@keyframes agreementScaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ================================================================ */
/* ШАПКА МОДАЛЬНОГО ОКНА                                            */
/* ================================================================ */

.agreement-modal-header {
    background: linear-gradient(135deg, #1a2a3a, #0f1724);
    padding: 20px 24px 16px;
    text-align: center;
    border-bottom: 2px solid #d4af37;
    position: relative;
    flex-shrink: 0;
}

.agreement-modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4af37, #ffd700, #d4af37);
}

.agreement-modal-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 6px;
}

.agreement-modal-header h2 {
    color: white;
    font-size: 20px;
    margin: 0;
    font-weight: 800;
    letter-spacing: 1px;
    font-family: 'Russo One', sans-serif;
}

.agreement-modal-header p {
    color: #d4af37;
    font-size: 13px;
    margin: 4px 0 0;
    letter-spacing: 0.5px;
}

/* ================================================================ */
/* ТЕЛО МОДАЛЬНОГО ОКНА (СКРОЛЛИРУЕМЫЙ КОНТЕНТ)                   */
/* ================================================================ */

.agreement-modal-body {
    padding: 20px 24px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.agreement-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    color: #c0d0e0;
    font-size: 14px;
    line-height: 1.6;
    max-height: 400px;
    scroll-behavior: smooth;
}

.agreement-content::-webkit-scrollbar {
    width: 6px;
}

.agreement-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.agreement-content::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

.agreement-content h2 {
    color: #d4af37;
    font-size: 18px;
    margin: 16px 0 8px;
    border-left: 4px solid #d4af37;
    padding-left: 12px;
}

.agreement-content h3 {
    color: #ffd700;
    font-size: 15px;
    margin: 14px 0 8px;
}

.agreement-content p {
    color: #b0c0d0;
    margin: 6px 0;
    line-height: 1.5;
}

.agreement-content ul,
.agreement-content ol {
    padding-left: 20px;
    margin: 6px 0;
}

.agreement-content li {
    color: #b0c0d0;
    margin: 4px 0;
}

.agreement-content strong {
    color: #ffd700;
}

.agreement-scroll-hint {
    text-align: center;
    font-size: 12px;
    color: #6a7a8e;
    padding: 8px 0 4px;
    transition: all 0.3s ease;
}

.agreement-updated {
    text-align: right;
    font-size: 11px;
    color: #6a7a8e;
    margin-top: 4px;
    padding-right: 4px;
}

/* ================================================================ */
/* ФУТЕР МОДАЛЬНОГО ОКНА                                            */
/* ================================================================ */

.agreement-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.15);
    background: rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

.agreement-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    transition: all 0.3s ease;
}

.agreement-checkbox-group:has(input:checked) {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.agreement-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #d4af37;
    flex-shrink: 0;
}

.agreement-checkbox-group label {
    color: #c0d0e0;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    line-height: 1.3;
}

.agreement-checkbox-group label:hover {
    color: #ffd700;
}

.agreement-actions {
    display: flex;
    gap: 12px;
}

.agreement-btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Russo One', sans-serif;
}

.agreement-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.agreement-btn-accept {
    background: linear-gradient(145deg, #28a745, #1e7e34);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.agreement-btn-accept:hover:not(:disabled) {
    background: linear-gradient(145deg, #34ce57, #28a745);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.agreement-btn-accept:active:not(:disabled) {
    transform: translateY(0);
}

.agreement-btn-reject {
    background: rgba(255, 255, 255, 0.08);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.3);
}

.agreement-btn-reject:hover {
    background: rgba(220, 53, 69, 0.15);
    border-color: rgba(220, 53, 69, 0.5);
}

/* ================================================================ */
/* АДАПТИВНОСТЬ                                                     */
/* ================================================================ */

@media (max-width: 768px) {
    .agreement-modal-container {
        max-width: 95%;
        max-height: 95vh;
        border-radius: 20px;
    }
    
    .agreement-modal-header {
        padding: 16px 18px 12px;
    }
    
    .agreement-modal-header h2 {
        font-size: 17px;
    }
    
    .agreement-modal-body {
        padding: 14px 16px;
    }
    
    .agreement-content {
        max-height: 300px;
        font-size: 13px;
        padding: 10px 12px;
    }
    
    .agreement-modal-footer {
        padding: 12px 16px 16px;
    }
    
    .agreement-checkbox-group {
        padding: 6px 10px;
    }
    
    .agreement-checkbox-group label {
        font-size: 12px;
    }
    
    .agreement-btn {
        padding: 12px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .agreement-modal-container {
        max-width: 100%;
        margin: 10px;
        border-radius: 16px;
        max-height: 98vh;
    }
    
    .agreement-modal-header {
        padding: 12px 14px 10px;
    }
    
    .agreement-modal-icon {
        font-size: 36px;
    }
    
    .agreement-modal-header h2 {
        font-size: 15px;
    }
    
    .agreement-modal-header p {
        font-size: 11px;
    }
    
    .agreement-modal-body {
        padding: 10px 12px;
    }
    
    .agreement-content {
        max-height: 250px;
        font-size: 12px;
        padding: 8px 10px;
    }
    
    .agreement-content h2 {
        font-size: 15px;
    }
    
    .agreement-content h3 {
        font-size: 13px;
    }
    
    .agreement-modal-footer {
        padding: 10px 12px 14px;
    }
    
    .agreement-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .agreement-btn {
        padding: 10px 14px;
        font-size: 12px;
    }
    
    .agreement-checkbox-group input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }
    
    .agreement-checkbox-group label {
        font-size: 11px;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 360px) {
    .agreement-content {
        max-height: 200px;
        font-size: 11px;
    }
    
    .agreement-modal-header h2 {
        font-size: 14px;
    }
    
    .agreement-btn {
        font-size: 11px;
        padding: 8px 12px;
    }
}