/**
 * Dosha Quiz Modal Styles
 * Color Theme: Dark Green & Soothing Purple
 */

:root {
    --primary-green: #2d5f3f;
    --primary-green-hover: #3d7f5f;
    --primary-green-dark: #1d4f2f;
    --accent-purple: #7b68ee;
    --accent-purple-light: #9b88ff;
    --accent-purple-dark: #5b48ce;
}

.dosha-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 10000;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-content h3 {
    font-size: 28px;
    color: #2c3e50;
    margin: 0 0 10px 0;
    text-align: center;
}

.modal-content > p {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group .required {
    color: #e74c3c;
}

.form-group input[type="text"],
.form-group input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus {
    outline: none;
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(123, 104, 238, 0.1);
}

/* Gender Options */
.gender-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.gender-label {
    flex: 1;
    min-width: 100px;
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gender-label:hover {
    border-color: var(--accent-purple);
    background: #f5f3ff;
}

.gender-label input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
}

.gender-label:has(input[type="radio"]:checked) {
    border-color: var(--primary-green);
    background: #e8f5e9;
}

.gender-label span {
    font-size: 15px;
    color: #555;
    font-weight: 500;
}

/* Modal Error */
.modal-error {
    padding: 12px 15px;
    background: #ffe8e8;
    color: #c0392b;
    border: 1px solid #e74c3c;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

/* Get Results Button */
.btn-get-results {
    width: 100%;
    background: var(--primary-green);
    color: #fff;
    border: none;
    padding: 15px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-get-results:hover:not(:disabled) {
    background: var(--primary-green-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 95, 63, 0.3);
}

.btn-get-results:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

.btn-spinner {
    display: inline-block;
}

/* Body class when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        padding: 30px 25px;
        max-width: 95%;
    }
    
    .modal-content h3 {
        font-size: 24px;
    }
    
    .gender-options {
        flex-direction: column;
    }
    
    .gender-label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 25px 20px;
    }
    
    .modal-content h3 {
        font-size: 22px;
    }
    
    .btn-get-results {
        font-size: 16px;
        padding: 12px;
    }
}

/* Animation */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -48%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.dosha-modal.show .modal-content {
    animation: modalFadeIn 0.3s ease;
}

