/**
 * Calculator Exit Intent Popup Styles
 */

/* Overlay */
.exit-intent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

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

/* Popup Container */
.exit-intent-popup {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 460px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    margin: auto;
}

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

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

.exit-intent-close:hover {
    background: #f0f0f0;
    color: #333;
}

/* Content */
.exit-intent-content {
    padding: 32px 24px 24px;
}

.exit-intent-title {
    margin: 0 0 6px 0;
    font-size: 1.5em;
    color: #1f2937;
    text-align: center;
    font-weight: 700;
}

.exit-intent-subtitle {
    margin: 0 0 18px 0;
    color: #374151;
    text-align: center;
    font-size: 0.9em;
    line-height: 1.4;
}

/* Rating Section */
.exit-intent-rating-section {
    margin-bottom: 18px;
    text-align: center;
}

.rating-label {
    margin: 0 0 10px 0;
    color: #374151;
    font-weight: 600;
    font-size: 0.95em;
}

.rating-hint {
    margin: 6px 0 0 0;
    color: #9ca3af;
    font-size: 0.8em;
    text-align: center;
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 0;
}

.star {
    background: none;
    border: none;
    font-size: 40px;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    line-height: 1;
    outline: none;
}

.star:hover,
.star.hover {
    color: #fbbf24;
    transform: scale(1.1);
}

.star.active {
    color: #f59e0b;
}

/* Feedback Section */
.exit-intent-feedback-section {
    margin-bottom: 16px;
    /* Always visible, no animation needed */
}

@keyframes fadeInSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feedback-label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 600;
    font-size: 0.9em;
}

.optional-label {
    color: #9ca3af;
    font-weight: 400;
    font-size: 0.85em;
}

.exit-intent-textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.exit-intent-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Email Section */
.exit-intent-email-section {
    margin-bottom: 16px;
    /* Always visible, no animation needed */
}

.email-benefit-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #eff6ff;
    border: 2px solid #bfdbfe;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 10px;
}

.benefit-icon {
    font-size: 20px;
    line-height: 1;
}

.benefit-text {
    flex: 1;
}

.benefit-text strong {
    display: block;
    color: #1e40af;
    font-size: 0.85em;
    margin-bottom: 3px;
}

.benefit-subtext {
    margin: 0;
    color: #3b82f6;
    font-size: 0.8em;
}

.email-label {
    display: block;
    margin-bottom: 10px;
    color: #374151;
    font-weight: 600;
    font-size: 0.95em;
}

.exit-intent-email-input {
    width: 100%;
    padding: 10px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.exit-intent-email-input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Actions */
.exit-intent-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.exit-intent-submit {
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-icon {
    font-size: 18px;
}

.exit-intent-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
    background: linear-gradient(135deg, #059669, #047857);
}

.exit-intent-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #d1d5db;
}

.exit-intent-skip {
    width: 100%;
    padding: 8px;
    background: none;
    color: #9ca3af;
    border: none;
    font-size: 12px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.exit-intent-skip:hover {
    color: #6b7280;
}

/* Trust elements */
.exit-intent-trust {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.exit-intent-trust p {
    margin: 0;
    color: #6b7280;
    font-size: 0.75em;
    line-height: 1.3;
}

/* Success Message */
.exit-intent-success {
    text-align: center;
    padding: 20px 0;
}

.exit-intent-success h3 {
    margin: 0 0 15px 0;
    color: #10b981;
    font-size: 1.5em;
}

.exit-intent-success p {
    margin: 0 0 25px 0;
    color: #6b7280;
}

.exit-intent-close-btn {
    padding: 12px 30px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.exit-intent-close-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 600px) {
    .exit-intent-popup {
        width: 95%;
        max-height: 90vh;
    }

    .exit-intent-content {
        padding: 24px 18px 18px;
    }

    .exit-intent-title {
        font-size: 1.3em;
    }

    .star {
        font-size: 32px;
    }
    
    .email-benefit-box {
        padding: 8px;
        gap: 8px;
    }
    
    .benefit-text strong {
        font-size: 0.8em;
    }
    
    .benefit-subtext {
        font-size: 0.75em;
    }
}

/* Prevent body scroll when popup is open */
body.exit-intent-open {
    overflow: hidden;
}

