/* Exit Intent Popup Styles */

.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    animation: fadeIn 0.3s ease-in-out;
}

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

.exit-popup-modal {
    background: linear-gradient(135deg, #2C1810 0%, #654321 50%, #8B4513 100%);
    border-radius: 16px;
    padding: 24px;
    max-width: 520px;
    width: 100%;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(139, 69, 19, 0.4);
    border: 2px solid rgba(205, 127, 50, 0.5);
    animation: slideUp 0.3s ease-out;
}

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

.exit-popup-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(205, 127, 50, 0.2);
    border: 2px solid rgba(205, 127, 50, 0.4);
    color: #F5E6D3;
    font-size: 24px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
    padding: 0;
}

.exit-popup-close:hover {
    background: rgba(205, 127, 50, 0.4);
    border-color: rgba(205, 127, 50, 0.6);
    transform: rotate(90deg);
}

.exit-popup-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(205, 127, 50, 0.5);
}

.exit-popup-header h2 {
    color: #F5E6D3;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: 'PT Sans Narrow', sans-serif;
}

.exit-popup-phone {
    display: inline-block;
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'PT Sans Narrow', sans-serif;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.5);
    border: 2px solid rgba(212, 165, 116, 0.3);
}

.exit-popup-phone:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(205, 127, 50, 0.7);
    background: linear-gradient(135deg, #D4A574 0%, #CD7F32 100%);
}

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

.exit-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.exit-form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.exit-form-group label {
    color: #F5E6D3;
    font-size: 13px;
    font-weight: 600;
    font-family: 'PT Sans Narrow', sans-serif;
}

.exit-form-group .required {
    color: #D4A574;
}

.exit-form-group input,
.exit-form-group select,
.exit-form-group textarea {
    background: rgba(44, 24, 16, 0.6);
    border: 2px solid rgba(205, 127, 50, 0.4);
    border-radius: 7px;
    padding: 10px 12px;
    color: #F5E6D3;
    font-size: 13px;
    font-family: 'Abel', sans-serif;
    transition: all 0.3s ease;
    width: 100%;
}

.exit-form-group input::placeholder,
.exit-form-group textarea::placeholder {
    color: rgba(245, 230, 211, 0.5);
}

.exit-form-group input:focus,
.exit-form-group select:focus,
.exit-form-group textarea:focus {
    outline: none;
    border-color: #CD7F32;
    background: rgba(44, 24, 16, 0.8);
    box-shadow: 0 0 0 3px rgba(205, 127, 50, 0.3);
}

.exit-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23CD7F32' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 34px;
}

.exit-file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.exit-file-upload-button {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    color: #fff;
    border: 2px solid rgba(212, 165, 116, 0.3);
    padding: 8px 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    font-family: 'PT Sans Narrow', sans-serif;
    transition: all 0.3s ease;
}

.exit-file-upload-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(205, 127, 50, 0.5);
    background: linear-gradient(135deg, #D4A574 0%, #CD7F32 100%);
}

.exit-file-name {
    color: rgba(245, 230, 211, 0.8);
    font-size: 13px;
    font-family: 'Abel', sans-serif;
}

.exit-popup-submit {
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    color: #fff;
    border: 2px solid rgba(212, 165, 116, 0.4);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'PT Sans Narrow', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(205, 127, 50, 0.5);
}

.exit-popup-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(205, 127, 50, 0.7);
    background: linear-gradient(135deg, #D4A574 0%, #CD7F32 100%);
    border-color: rgba(212, 165, 116, 0.6);
}

.exit-popup-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.exit-popup-success {
    text-align: center;
    padding: 20px 12px;
}

.exit-success-icon {
    width: 58px;
    height: 58px;
    background: linear-gradient(135deg, #CD7F32 0%, #8B4513 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #fff;
    margin: 0 auto 12px;
    animation: scaleIn 0.3s ease-out;
    border: 3px solid rgba(212, 165, 116, 0.5);
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.exit-popup-success h3 {
    color: #F5E6D3;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'PT Sans Narrow', sans-serif;
}

.exit-popup-success p {
    color: rgba(245, 230, 211, 0.9);
    font-size: 14px;
    font-family: 'Abel', sans-serif;
}

/* Responsive Design */
@media (max-width: 768px) {
    .exit-popup-modal {
        padding: 18px 14px;
        max-width: 95%;
    }
    
    .exit-popup-header h2 {
        font-size: 18px;
    }
    
    .exit-popup-phone {
        font-size: 18px;
        padding: 7px 14px;
    }
    
    .exit-form-row {
        grid-template-columns: 1fr;
    }
    
    .exit-popup-submit {
        font-size: 14px;
        padding: 11px 14px;
    }
}

@media (max-height: 780px) {
    .exit-popup-overlay {
        padding: 8px;
    }

    .exit-popup-modal {
        padding: 16px 12px;
        max-height: calc(100vh - 16px);
    }

    .exit-popup-header {
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .exit-popup-header h2 {
        font-size: 17px;
        margin-bottom: 8px;
    }

    .exit-popup-phone {
        font-size: 16px;
        padding: 6px 12px;
    }

    .exit-popup-form {
        gap: 8px;
    }

    .exit-form-group label {
        font-size: 12px;
    }

    .exit-form-group input,
    .exit-form-group select,
    .exit-form-group textarea {
        padding: 8px 10px;
        font-size: 12px;
    }

    .exit-popup-submit {
        font-size: 13px;
        padding: 10px 12px;
        letter-spacing: 0.5px;
    }
}

/* Theme compatibility - Popup uses consistent brown/bronze theme regardless of site theme */
[data-theme="dark"] .exit-popup-modal {
    background: linear-gradient(135deg, #2C1810 0%, #654321 50%, #8B4513 100%);
    border-color: rgba(205, 127, 50, 0.5);
}

[data-theme="light"] .exit-popup-overlay {
    background: rgba(0, 0, 0, 0.85);
}

[data-theme="light"] .exit-popup-modal {
    background: linear-gradient(135deg, #2C1810 0%, #654321 50%, #8B4513 100%);
    border-color: rgba(205, 127, 50, 0.5);
}
