/* ============================================
   Popup: Solicită o prezentare
   ============================================ */

/* z-index peste preloader (99999999) ca popup-ul să rămână vizibil */
.overlay-pop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(10px);
    animation: presFadeIn 0.3s ease;
    overflow: visible; /* dropdown-urile native să nu fie tăiate */
    pointer-events: none; /* overlay-ul nu absoarbe click-uri */
}

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

/* Stare vizibilă și clickabilă – override la .popup din style.css (opacity:0 / transform) */
.overlay-pop .popup {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
    border-radius: 24px;
    padding: 44px 40px 36px;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.35);
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    animation: presSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

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

/* Buton închidere – și clasa .popup-close-btn ca să nu fie prins de main.js */
.overlay-pop .popup .close-btn,
.overlay-pop .popup .popup-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: #64748b;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.overlay-pop .popup .close-btn:hover,
.overlay-pop .popup .popup-close-btn:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #0f172a;
    transform: rotate(90deg);
}

.overlay-pop .popup h2 {
    font-size: 1.45rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 24px;
    text-align: center;
}

.overlay-pop .popup .form-group {
    margin-bottom: 18px;
    text-align: left;
}

.overlay-pop .popup label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.overlay-pop .popup input[type="text"],
.overlay-pop .popup select {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
    color: #0f172a;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.overlay-pop .popup input[type="text"]:focus,
.overlay-pop .popup select:focus {
    outline: none;
    border-color: #0ea5e9;
    box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.15);
}

/* Județ / Localitate – selectabil, fundal deschis, text lizibil */
.overlay-pop .popup select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
    position: relative;
    z-index: 2;
}

.overlay-pop .popup select:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background-color: #f1f5f9;
}

.overlay-pop .popup select option {
    background: #ffffff;
    color: #0f172a;
    padding: 10px 14px;
}

/* Rând telefon – +40 la aceeași înălțime ca inputul */
.overlay-pop .popup .phone-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.overlay-pop .popup .phone-row .country-code,
.overlay-pop .popup .phone-row input[name="phone_number"] {
    height: 50px;
    min-height: 50px;
    padding: 0 14px;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 14px;
    box-sizing: border-box;
    line-height: 1.25;
}

.overlay-pop .popup .phone-row .country-code {
    flex-shrink: 0;
    width: 64px;
    background: #f1f5f9;
    font-weight: 600;
    color: #334155;
    display: flex;
    align-items: center;
    justify-content: center;
}

.overlay-pop .popup .phone-row input[name="phone_number"] {
    flex: 1;
    min-width: 0;
    color: #0f172a;
    background: #fff;
}

.overlay-pop .popup .submit-btn {
    width: 100%;
    margin-top: 8px;
    padding: 16px 24px;
    font-size: 1.05rem;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(145deg, #0ea5e9 0%, #0284c7 100%);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(14, 165, 233, 0.35);
    transition: transform 0.2s, box-shadow 0.2s;
}

.overlay-pop .popup .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(14, 165, 233, 0.45);
}

.overlay-pop .popup .submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.overlay-pop .popup .form-error {
    font-size: 0.85rem;
    color: #dc2626;
    margin-top: 6px;
}

@media (max-width: 520px) {
    .overlay-pop .popup {
        padding: 36px 24px 28px;
    }
    .overlay-pop .popup h2 {
        font-size: 1.25rem;
    }
    .overlay-pop .popup .phone-row {
        flex-direction: column;
    }
    .overlay-pop .popup .phone-row .country-code {
        width: 100%;
    }
}
