/* ==========================================================================
   V2 Popup Form — Right-Side Slide-In Panel
   ========================================================================== */

/* Overlay */
.v2-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.v2-popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Panel */
.v2-popup-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 625px;
    height: 100%;
    background: #ffffff;
    z-index: 99999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
}

.v2-popup-panel.is-active {
    transform: translateX(0);
}

/* Close button */
.v2-popup-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: #374151;
    z-index: 10;
    transition: background 0.2s ease, color 0.2s ease;
}

.v2-popup-close:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Content area */
.v2-popup-content {
    flex: 1;
    padding: 40px 10px 0px;
    overflow-y: auto;
}

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

/* Everest Forms specific styles */
.everest-forms .evf-container label.evf-field-label .evf-label {
    font-weight: 600 !important;
}

.everest-forms .evf-container label.evf-field-label {
    color: #494d50 !important;
}

.everest-forms .evf-container input[type="text"], .everest-forms .evf-container input[type="email"], .everest-forms .evf-container input[type="number"], .everest-forms .evf-container input[type="tel"],  .everest-forms .evf-container input[type="url"], .everest-forms .evf-container textarea, .everest-forms .evf-container select {
    font-family: var(--body-font);
    padding: 10px 12px !important;
    color: #494d50 !important;
    border: 1px solid #8e98a2 !important;
    border-radius: 0 !important;
}

.everest-forms .evf-container .evf-field-checkbox ul li {
    align-items: flex-start;
}

.everest-forms .evf-submit-container button[type="submit"] {
    background-color: var(--primary-color) !important;
    border: none !important;
    min-width: 100px;
}

.everest-forms .evf-submit-container button[type="submit"]:hover {
    background-color: var(--secondary-clr) !important;
    color: #ffffff !important;
}
/* ==========================================================================
   Responsive — Mobile (full width)
   ========================================================================== */
@media (max-width: 576px) {
    .v2-popup-panel {
        width: 100%;
    }

    .v2-popup-content {
        padding: 56px 20px 20px;
    }

    .v2-egf-form-wrapper .evf-frontend-row:not(:last-child) {
        grid-template-columns: repeat(1, 1fr) !important;
    }
}

@media (min-width: 577px) and (max-width: 768px) {
    .v2-popup-panel {
        width: 90%;
    }
}
