/**
 * Email Capture Modal Styles
 * 
 * @package AI_Tarot_Reader
 * @since 2.0.0
 */

/* Modal Overlay & Container */
.tarot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarot-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.tarot-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

/* Close Button */
.tarot-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.tarot-modal-close:hover {
    background: #f0f0f0;
    color: #333;
    transform: rotate(90deg);
}

/* Modal Body */
.tarot-modal-body {
    padding: 40px 30px;
    text-align: center;
}

.tarot-modal-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: bounce 1s ease infinite;
}

.tarot-modal-body h2 {
    color: #2d3748;
    font-size: 26px;
    margin-bottom: 10px;
    font-weight: 700;
}

.tarot-modal-body > p {
    color: #718096;
    font-size: 15px;
    margin-bottom: 30px;
    line-height: 1.5;
}

/* Form Styles */
.tarot-email-form {
    margin-top: 20px;
}

.tarot-form-group {
    margin-bottom: 20px;
}

.tarot-email-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.tarot-email-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Checkbox Group */
.tarot-checkbox-group {
    text-align: left;
    margin: 20px 0;
}

.tarot-checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #4a5568;
}

.tarot-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #667eea;
}

/* Submit Button */
.tarot-submit-btn {
    width: 100%;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tarot-gradient-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tarot-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.tarot-submit-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.tarot-submit-btn .btn-loader .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 0.8s linear infinite;
}

/* Form Messages */
.tarot-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.tarot-form-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tarot-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Privacy Note */
.tarot-privacy-note {
    font-size: 12px;
    color: #a0aec0;
    margin-top: 15px;
    margin-bottom: 0;
}

/* Benefits List */
.tarot-modal-benefits {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #e2e8f0;
}

.benefit-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 14px;
    color: #4a5568;
}

.benefit-icon {
    font-size: 18px;
    margin-right: 10px;
}

/* Body class when modal is open */
body.tarot-modal-open {
    overflow: hidden;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 600px) {
    .tarot-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .tarot-modal-body {
        padding: 30px 20px;
    }

    .tarot-modal-body h2 {
        font-size: 22px;
    }

    .tarot-modal-body > p {
        font-size: 14px;
    }

    .tarot-modal-icon {
        font-size: 40px;
    }
}

/* Download Button Enhancement */
.tarot-download-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.tarot-download-btn[data-email-captured="true"] {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    animation: pulse 2s ease infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
    }
    50% {
        box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
    }
}
