/**
 * Enhanced Subscription Modal with Trust Signals
 * Inspired by HelloFresh's signup flow
 */

/* Modal Overlay */
.subscription-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
    padding: 20px;
}

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

/* Enhanced Modal Container */
.subscription-modal-enhanced {
    background: #faf9f7;
    border-radius: 20px;
    max-width: 1000px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease;
    position: relative;
    padding: 50px 40px;
    max-height: 90vh;
    overflow-y: auto;
}

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

/* Close Button */
.subscription-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.subscription-modal-close:hover {
    background: #e0e0e0;
    transform: rotate(90deg);
}

.subscription-modal-close i {
    font-size: 20px;
    color: #666;
}

/* Modal Title */
.subscription-modal-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 30px;
    text-align: center;
}

/* Two Column Layout */
.modal-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 20px;
}

/* Left Panel - Trust Signals */
.modal-left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Trust Cards */
.trust-card {
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    animation: slideInLeft 0.5s ease;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.trust-card-green {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.trust-card-blue {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    display: flex;
    gap: 20px;
    align-items: center;
}

.trust-card-image {
    margin-bottom: 20px;
}

.trust-card-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

/* Benefits List */
.benefit-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.benefit-item-enhanced {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.5;
}

.benefit-item-enhanced i {
    color: #4A7C59;
    font-size: 1.1rem;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Social Proof Card */
.social-proof-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4A7C59 0%, #3d6b4a 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.social-proof-icon i {
    font-size: 40px;
    color: white;
}

.social-proof-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.3;
}

.big-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: #4A7C59;
    display: block;
}

.social-proof-content p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
}

/* Disclaimer */
.modal-disclaimer {
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
    line-height: 1.4;
}

/* Right Panel - CTA */
.modal-right-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: slideInRight 0.5s ease;
}

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

/* Discount Highlight */
.discount-highlight {
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.discount-badge {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.discount-amount {
    font-size: 3rem;
    font-weight: 900;
    color: #fbbf24;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.discount-subtitle {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
}

/* Discount Breakdown */
.discount-breakdown {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.discount-breakdown h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.breakdown-label {
    font-size: 0.95rem;
    color: #555;
}

.breakdown-value {
    font-size: 1rem;
    font-weight: 700;
    color: #4A7C59;
}

.breakdown-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 0;
    margin-top: 8px;
    border-top: 2px solid #4A7C59;
}

.breakdown-total .breakdown-label strong {
    font-size: 1.1rem;
    color: #1a1a1a;
}

.breakdown-total .breakdown-value strong {
    font-size: 1.3rem;
    color: #4A7C59;
}

/* Enhanced CTA Button */
.subscription-modal-cta-enhanced {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #000;
    color: white;
    padding: 20px 40px;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.subscription-modal-cta-enhanced:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.subscription-modal-cta-enhanced i {
    font-size: 1.3rem;
}

/* Guarantees */
.modal-guarantees {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.guarantee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
    color: #333;
    font-weight: 600;
}

.guarantee-item i {
    color: #4A7C59;
    font-size: 1.2rem;
}

/* Footer Note */
.modal-footer-note {
    font-size: 0.8rem;
    color: #666;
    line-height: 1.5;
    padding: 15px;
    background: #fff8e1;
    border-radius: 8px;
    border-left: 4px solid #fbbf24;
}

.modal-footer-note i {
    color: #f59e0b;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 968px) {
    .modal-two-column {
        grid-template-columns: 1fr;
    }
    
    .subscription-modal-enhanced {
        padding: 40px 30px;
    }
    
    .subscription-modal-title {
        font-size: 2rem;
    }
    
    .discount-amount {
        font-size: 2.5rem;
    }
}

@media (max-width: 640px) {
    .subscription-modal-overlay {
        padding: 10px;
    }
    
    .subscription-modal-enhanced {
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    .subscription-modal-title {
        font-size: 1.6rem;
        margin-bottom: 20px;
    }
    
    .modal-two-column {
        gap: 20px;
    }
    
    .trust-card {
        padding: 20px;
    }
    
    .trust-card-blue {
        flex-direction: column;
        text-align: center;
    }
    
    .discount-amount {
        font-size: 2rem;
    }
    
    .discount-breakdown {
        padding: 20px;
    }
    
    .subscription-modal-cta-enhanced {
        padding: 16px 30px;
        font-size: 1.1rem;
    }
    
    .big-number {
        font-size: 2rem;
    }
}

/* ============================================
   EMAIL CAPTURE MODAL (STEP 2)
   ============================================ */

.email-capture-modal {
    background: #faf9f7;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease;
    position: relative;
    text-align: center;
}

.email-modal-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
}

.email-modal-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Email Form */
.email-capture-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1rem;
    border: 2px solid #d0d0d0;
    border-radius: 8px;
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #4A7C59;
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

/* Submit Button */
.email-submit-btn {
    width: 100%;
    padding: 18px 30px;
    background: #1a1a1a;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.email-submit-btn:hover {
    background: #333333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* Go Back Button */
.go-back-btn {
    width: 100%;
    padding: 14px 30px;
    background: transparent;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.go-back-btn:hover {
    color: #1a1a1a;
}

/* Email Modal Disclaimer */
.email-modal-disclaimer {
    font-size: 0.75rem;
    color: #888;
    margin-top: 20px;
    line-height: 1.4;
    font-style: italic;
}

/* Responsive for Email Modal */
@media (max-width: 640px) {
    .email-capture-modal {
        padding: 40px 30px;
        width: 95%;
    }
    
    .email-modal-title {
        font-size: 1.6rem;
    }
    
    .email-modal-subtitle {
        font-size: 0.95rem;
    }
    
    .form-group input {
        padding: 14px 16px;
    }
    
    .email-submit-btn {
        padding: 16px 30px;
        font-size: 1rem;
    }
}

/* ============================================
   EMAIL CONFIRMATION MODAL (STEP 3)
   ============================================ */

.email-confirmation-modal {
    background: #faf9f7;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    animation: slideUp 0.4s ease;
    position: relative;
    text-align: center;
}

.email-confirmation-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 12px;
    line-height: 1.3;
}

.email-confirmation-subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

.email-confirmation-subtitle strong {
    color: #1a1a1a;
    font-weight: 600;
}

/* Email Icon Animation */
.email-icon-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.email-envelope {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #FFD89B 0%, #FFBC6B 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 188, 107, 0.4);
    animation: floatEnvelope 3s ease-in-out infinite;
}

@keyframes floatEnvelope {
    0%, 100% {
        transform: translateY(0px) rotate(-5deg);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
    }
}

.email-envelope i {
    font-size: 50px;
    color: white;
}

/* Sparkles Animation */
.email-sparkle {
    position: absolute;
    color: #4A7C59;
    font-size: 20px;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle-1 {
    top: 10px;
    left: 20px;
    animation-delay: 0s;
}

.sparkle-2 {
    top: 20px;
    right: 30px;
    animation-delay: 0.7s;
}

.sparkle-3 {
    bottom: 30px;
    left: 30px;
    animation-delay: 1.4s;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(180deg);
    }
}

/* Resend Button */
.email-resend-btn {
    width: 100%;
    padding: 14px 30px;
    background: #f0f0f0;
    color: #666;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.email-resend-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* Go Back Link */
.go-back-link {
    width: 100%;
    padding: 10px;
    background: transparent;
    color: #666;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    transition: color 0.3s ease;
    margin-bottom: 30px;
}

.go-back-link:hover {
    color: #1a1a1a;
}

/* CTA Box */
.email-cta-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 12px;
    padding: 25px;
    border: 2px solid #4A7C59;
}

.email-cta-text {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.email-login-btn {
    width: 100%;
    padding: 16px 30px;
    background: #000000;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.email-login-btn:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.email-login-btn i {
    font-size: 1.2rem;
}

/* Toast Notification */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #1a1a1a;
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 600;
    z-index: 10001;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.toast-notification.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-notification.toast-success {
    background: #4A7C59;
}

.toast-notification i {
    font-size: 1.3rem;
}

/* Responsive for Email Confirmation Modal */
@media (max-width: 640px) {
    .email-confirmation-modal {
        padding: 40px 30px;
        width: 95%;
    }
    
    .email-confirmation-title {
        font-size: 1.6rem;
    }
    
    .email-confirmation-subtitle {
        font-size: 0.95rem;
    }
    
    .email-icon-container {
        width: 120px;
        height: 120px;
        margin-bottom: 30px;
    }
    
    .email-envelope {
        width: 100px;
        height: 100px;
    }
    
    .email-envelope i {
        font-size: 40px;
    }
    
    .email-sparkle {
        font-size: 16px;
    }
    
    .email-cta-box {
        padding: 20px;
    }
    
    .email-login-btn {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .toast-notification {
        right: 10px;
        left: 10px;
        font-size: 0.9rem;
    }
}
