/* Terms & Conditions Modal Styles */
/* Rebel Studios AI - Purple/Pink Gradient Theme */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --dark: #0f172a;
    --light: #f8fafc;
    --gray: #64748b;
}

/* Modal Overlay/Backdrop */
.terms-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.terms-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.terms-modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(99, 102, 241, 0.1);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.terms-modal-overlay.active .terms-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.terms-modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.terms-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.terms-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, transform 0.3s;
    font-size: 1.5rem;
    line-height: 1;
    padding: 0;
}

.terms-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.terms-modal-close:focus {
    outline: 2px solid white;
    outline-offset: 2px;
}

/* Modal Content */
.terms-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    background: var(--light);
}

.terms-modal-content h2 {
    font-size: 1.4rem;
    color: var(--dark);
    margin: 1.5rem 0 1rem;
    display: flex;
    align-items: center;
}

.terms-modal-content h2::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    margin-right: 12px;
}

.terms-modal-content h2:first-child {
    margin-top: 0;
}

.terms-modal-content p {
    color: #334155;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.terms-modal-content ul,
.terms-modal-content ol {
    margin: 1rem 0 1rem 2rem;
    color: #334155;
    line-height: 1.7;
}

.terms-modal-content li {
    margin-bottom: 0.5rem;
}

.terms-modal-content a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s;
}

.terms-modal-content a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.terms-modal-content .highlight-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(236, 72, 153, 0.05));
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.terms-modal-content .important {
    background: rgba(236, 72, 153, 0.1);
    border-left: 3px solid var(--secondary);
    padding: 1rem 1.5rem;
    border-radius: 0 8px 8px 0;
    margin: 1rem 0;
}

/* Custom Scrollbar */
.terms-modal-content::-webkit-scrollbar {
    width: 8px;
}

.terms-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.terms-modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 4px;
}

.terms-modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Modal Footer */
.terms-modal-footer {
    padding: 1.5rem 2rem;
    background: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-shrink: 0;
}

.terms-modal-btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    min-width: 120px;
}

.terms-modal-btn-cancel {
    background: var(--light);
    color: var(--gray);
    border: 2px solid var(--gray);
}

.terms-modal-btn-cancel:hover {
    background: var(--gray);
    color: white;
    transform: translateY(-2px);
}

.terms-modal-btn-agree {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.terms-modal-btn-agree:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
    transform: translateY(-2px);
    opacity: 0.95;
}

.terms-modal-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* View Terms Link Style */
.view-terms-link {
    color: var(--primary);
    text-decoration: underline;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s;
}

.view-terms-link:hover {
    color: var(--secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .terms-modal {
        width: 95%;
        max-height: 90vh;
        margin: 10px;
    }
    
    .terms-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .terms-modal-title {
        font-size: 1.2rem;
    }
    
    .terms-modal-content {
        padding: 1.5rem;
    }
    
    .terms-modal-content h2 {
        font-size: 1.2rem;
    }
    
    .terms-modal-footer {
        padding: 1rem 1.5rem;
        flex-direction: column-reverse;
    }
    
    .terms-modal-btn {
        width: 100%;
        padding: 1rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .terms-modal {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        margin: 0;
    }
    
    .terms-modal-content {
        padding: 1rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .terms-modal-overlay,
    .terms-modal,
    .terms-modal-close,
    .terms-modal-btn {
        transition: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .terms-modal {
        border: 2px solid var(--dark);
    }
    
    .terms-modal-btn-cancel {
        border: 2px solid var(--dark);
    }
}

/* Print Styles */
@media print {
    .terms-modal-overlay {
        position: static;
        background: none;
        backdrop-filter: none;
        display: block;
    }
    
    .terms-modal {
        box-shadow: none;
        transform: none;
        max-height: none;
    }
    
    .terms-modal-header,
    .terms-modal-footer,
    .terms-modal-close {
        display: none;
    }
}
