.exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 1rem; /* Add padding to container to prevent edge touching */
    box-sizing: border-box;
}

.exit-popup.is-active {
    display: flex;
    opacity: 1;
}

.exit-popup-content {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 850px;
    width: 90%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    box-sizing: border-box; /* Ensure padding doesn't overflow width */
}

.exit-popup-side {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    padding: 3rem;
    width: 40%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    position: relative;
}

.exit-popup-side::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.exit-popup-logo {
    margin-bottom: 2rem;
    max-width: 180px;
    filter: brightness(0) invert(1);
    position: relative;
    z-index: 1;
}

.exit-popup-side h3 {
    color: white;
    font-size: 1.75rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.exit-popup-side p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 0;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.exit-popup-form-wrapper {
    padding: 3rem;
    width: 60%;
    position: relative;
    background: #fff;
}

.exit-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f1f5f9;
    color: #64748b;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10;
}

.exit-popup-close:hover {
    background: #e2e8f0;
    color: #0f172a;
    transform: rotate(90deg);
}

.exit-popup-title-mobile {
    display: none;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

.exit-popup input[type="text"],
.exit-popup input[type="tel"],
.exit-popup input[type="email"],
.exit-popup select {
    width: 100%;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
    color: #334155;
}

.exit-popup input:focus,
.exit-popup select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: #fff;
}

.exit-popup button[type="submit"] {
    width: 100%;
    padding: 1rem;
    background: #e11d48;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(225, 29, 72, 0.3);
}

.exit-popup button[type="submit"]:hover {
    background: #be123c;
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(225, 29, 72, 0.4);
}

.exit-popup .checkbox {
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exit-popup .checkbox input {
    width: auto;
    margin: 0;
}

@media (max-width: 1024px) {
    .exit-popup-side,
    .exit-popup-logo {
        display: none !important;
    }

    .exit-popup {
        padding: 0.75rem !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .exit-popup-content {
        flex-direction: column;
        width: 100% !important;
        max-width: 480px !important;
        margin: 0 auto !important;
        max-height: 90vh;
        overflow-y: auto;
        border-radius: 16px !important;
    }

    .exit-popup-form-wrapper {
        width: 100%;
        padding: 1.25rem;
        display: flex;
        flex-direction: column;
    }
    
    .exit-popup-title-mobile {
        display: block;
        text-align: center;
        margin-bottom: 1rem;
        font-size: 1.25rem;
    }
}
