/* Opt-in Modal Styles */
.opt-in-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: modalFadeIn 0.4s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.opt-in-modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    margin: 8% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
    animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
    from { 
        opacity: 0; 
        transform: translateY(-50px) scale(0.9); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0) scale(1); 
    }
}

.opt-in-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #718096;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.opt-in-close:hover {
    background: #e2e8f0;
    color: #2d3748;
    transform: scale(1.1);
}

.opt-in-header {
    background: linear-gradient(135deg, #2b6cb0 0%, #3182ce 100%);
    color: white;
    padding: 40px 30px 30px 30px;
    border-radius: 20px 20px 0 0;
    text-align: center;
    position: relative;
}

.opt-in-header::before {
    content: "🎁";
    font-size: 3rem;
    display: block;
    margin-bottom: 15px;
}

.opt-in-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.opt-in-header .subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin: 0;
    font-weight: 500;
}

.opt-in-body {
    padding: 30px;
}

.guide-preview {
    background: linear-gradient(135deg, rgba(43, 108, 176, 0.05) 0%, rgba(221, 107, 32, 0.05) 100%);
    border: 2px solid rgba(43, 108, 176, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
}

.guide-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--accent-blue);
    margin-bottom: 15px;
}

.guide-benefits {
    text-align: left;
    margin: 20px 0;
}

.guide-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.guide-benefits li {
    padding: 8px 0;
    font-size: 1rem;
    color: var(--text-secondary);
    position: relative;
    padding-left: 25px;
}

.guide-benefits li::before {
    content: "✓";
    color: var(--accent-green);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 8px;
}

.opt-in-form {
    margin-top: 25px;
}

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

.opt-in-form label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 1rem;
}

.opt-in-form input {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--border-light);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
}

.opt-in-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(43, 108, 176, 0.1);
    transform: translateY(-1px);
}

.opt-in-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--accent-orange) 0%, #f6ad55 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 18px 25px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.opt-in-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(221, 107, 32, 0.4);
    background: linear-gradient(135deg, #f6ad55 0%, var(--accent-orange) 100%);
}

.opt-in-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.trust-message {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-light);
}

.opt-in-success {
    display: none;
    text-align: center;
    padding: 40px 30px;
}

.opt-in-success .success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    color: var(--accent-green);
}

.opt-in-success h3 {
    color: var(--accent-green);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 700;
}

.opt-in-success p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.opt-in-success .btn-secondary {
    background: var(--accent-blue);
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.opt-in-success .btn-secondary:hover {
    background: var(--light-blue);
    transform: translateY(-1px);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .opt-in-modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 90vh;
    }
    
    .opt-in-header {
        padding: 30px 20px 25px 20px;
    }
    
    .opt-in-header h2 {
        font-size: 1.5rem;
    }
    
    .opt-in-header .subtitle {
        font-size: 1rem;
    }
    
    .opt-in-body {
        padding: 25px 20px;
    }
    
    .guide-preview {
        padding: 20px;
    }
    
    .guide-title {
        font-size: 1.2rem;
    }
    
    .opt-in-close {
        top: 10px;
        right: 15px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .opt-in-modal-content {
        width: 98%;
        margin: 3% auto;
        border-radius: 15px;
    }
    
    .opt-in-header {
        padding: 25px 15px 20px 15px;
        border-radius: 15px 15px 0 0;
    }
    
    .opt-in-header::before {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .opt-in-header h2 {
        font-size: 1.3rem;
    }
    
    .opt-in-body {
        padding: 20px 15px;
    }
    
    .guide-benefits li {
        font-size: 0.95rem;
    }
    
    .opt-in-form input {
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .opt-in-submit {
        font-size: 1.1rem;
        padding: 15px 20px;
    }
}
