/* Exit Intent Overlay */

.exit-intent-backdrop {
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(26, 22, 19, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: exitIntentFadeIn 300ms ease-out;
}

.exit-intent-modal {
    position: relative;
    width: 100%;
    max-width: 440px;
    background: #FDFBF7;
    border-radius: 12px;
    padding: 40px 32px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: exitIntentSlideUp 400ms ease-out;
}

.exit-intent-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 150ms ease, color 150ms ease;
    line-height: 1;
}

.exit-intent-close:hover {
    background: rgba(0, 0, 0, 0.06);
    color: #333;
}

.exit-intent-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text, #1a1613);
    margin: 0 0 12px 0;
    text-align: center;
    line-height: 1.3;
}

.exit-intent-subtitle {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    color: var(--color-text-light, #6b6560);
    margin: 0 0 24px 0;
    text-align: center;
    line-height: 1.5;
}

.exit-intent-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.exit-intent-input {
    width: 100%;
    padding: 14px 16px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    color: #1a1613;
    background: #fff;
    border: 2px solid var(--border-color, #e0dbd5);
    border-radius: 8px;
    outline: none;
    transition: border-color 200ms ease;
    box-sizing: border-box;
}

.exit-intent-input:focus {
    border-color: var(--color-primary, #d4a24c);
}

.exit-intent-input::placeholder {
    color: #aaa;
}

.exit-intent-submit {
    width: 100%;
    padding: 14px 24px;
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    background: var(--color-primary, #E8B86D);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    min-height: 44px;
    transition: background-color 200ms ease, transform 100ms ease;
}

.exit-intent-submit:hover {
    background: #d4a24c;
}

.exit-intent-submit:active {
    transform: scale(0.98);
}

.exit-intent-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.exit-intent-privacy {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.8rem;
    color: #999;
    text-align: center;
    margin: 16px 0 0 0;
    line-height: 1.4;
}

.exit-intent-privacy a {
    color: #999;
    text-decoration: underline;
}

.exit-intent-privacy a:hover {
    color: #666;
}

.exit-intent-error {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.85rem;
    color: #c0392b;
    text-align: center;
    margin: 8px 0 0 0;
    min-height: 1.2em;
}

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

.exit-intent-success-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.exit-intent-success-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text, #1a1613);
    margin: 0 0 8px 0;
}

.exit-intent-success-text {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.95rem;
    color: var(--color-text-light, #6b6560);
    margin: 0;
}

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .exit-intent-backdrop,
    .exit-intent-modal {
        animation-duration: 0.01ms;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .exit-intent-modal {
        padding: 32px 24px 24px;
    }

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