 * Lead popup — delayed callback modal (brand style)
 */
html.dr-lead-popup-open,
body.dr-lead-popup-open {
    overflow: hidden;
}

.dr-lead-popup {
    --dr-popup-bg: #121417;
    --dr-popup-surface: #1c2026;
    --dr-popup-border: rgba(255, 255, 255, 0.12);
    --dr-popup-text: #f5f7fa;
    --dr-popup-muted: #a8b0bc;
    --dr-popup-label: #e8a0a0;
    --dr-popup-red: #c21414;
    --dr-popup-red-dark: #970202;
    --dr-popup-navy: #011627;

    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(1, 22, 39, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, visibility 0.22s ease !important;
}

.dr-lead-popup.is-visible {
    opacity: 1;
    visibility: visible;
}

.dr-lead-popup[hidden] {
    display: none !important;
}

.dr-lead-popup__dialog {
    position: relative;
    width: min(100%, 440px);
    max-height: min(92vh, 760px);
    overflow: auto;
    background: var(--dr-popup-bg);
    color: var(--dr-popup-text);
    border: 1px solid var(--dr-popup-border);
    border-radius: 18px;
    padding: 22px 22px 18px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
    transform: translateY(12px) scale(0.98);
    transition: transform 0.22s ease !important;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

.dr-lead-popup.is-visible .dr-lead-popup__dialog {
    transform: translateY(0) scale(1);
}

.dr-lead-popup__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    transition: background 0.15s ease;
}

.dr-lead-popup__close:hover,
.dr-lead-popup__close:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    outline: none;
}

.dr-lead-popup__close svg {
    width: 14px;
    height: 14px;
    display: block;
}

.dr-lead-popup__title {
    margin: 0 36px 4px 0;
    font-size: clamp(1.4rem, 2vw, 1.7rem);
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
}

.dr-lead-popup__subtitle {
    margin: 0 0 12px;
    font-size: 0.88rem;
    line-height: 1.4;
    color: var(--dr-popup-muted);
}

.dr-lead-popup__form .wpcf7 {
    margin: 0;
}

.dr-lead-popup__form .wpcf7 form > p,
.dr-lead-popup__form .wpcf7 form > div {
    margin: 0 !important;
}

.dr-lead-popup__form .wpcf7 form > p:last-of-type {
    margin-bottom: 0 !important;
}

.dr-lead-popup__form .wpcf7 form br {
    display: none;
}

.dr-lead-popup__form .wpcf7-form-control-wrap {
    display: block !important;
    width: 100%;
    margin: 0 0 10px !important;
}

.dr-lead-popup__form label {
    display: block;
    margin: 0;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--dr-popup-label);
}

.dr-lead-popup__form label .wpcf7-form-control-wrap {
    margin-top: 6px !important;
}

.dr-lead-popup__form style {
    display: none !important;
}

.dr-lead-popup__form input:not([type="submit"]):not([type="checkbox"]):not([type="radio"]),
.dr-lead-popup__form select,
.dr-lead-popup__form textarea {
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0.7em 0.85em !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 8px !important;
    background: var(--dr-popup-surface) !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    line-height: 1.3 !important;
    box-shadow: none !important;
    appearance: none;
}

.dr-lead-popup__form input::placeholder,
.dr-lead-popup__form textarea::placeholder {
    color: #8b93a0 !important;
    opacity: 1 !important;
}

.dr-lead-popup__form select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b93a0' d='M1.41 0L6 4.58 10.59 0 12 1.41l-6 6-6-6z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 2.4em !important;
    color-scheme: dark;
}

.dr-lead-popup__form select option {
    color: #111;
    background: #fff;
}

.dr-lead-popup__form input:focus,
.dr-lead-popup__form select:focus,
.dr-lead-popup__form textarea:focus {
    border-color: var(--dr-popup-red) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(194, 20, 20, 0.25) !important;
}

.dr-lead-popup__form .wpcf7-not-valid-tip {
    color: #ff8e8e;
    font-size: 0.8rem;
}

.dr-lead-popup__form .wpcf7-response-output {
    margin: 0.75em 0 0 !important;
    padding: 0.65em 0.85em !important;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #fff;
}

.dr-lead-popup__form input.wpcf7-submit {
    width: 100% !important;
    margin-top: 4px !important;
    margin-bottom: 0 !important;
    padding: 0.75em 1em !important;
    border: 2px solid var(--dr-popup-red) !important;
    border-radius: 8px !important;
    background: var(--dr-popup-red) !important;
    color: #fff !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
    cursor: pointer;
    box-shadow: 0 0 0 3px rgba(194, 20, 20, 0.22) !important;
    transition: background 0.15s ease, border-color 0.15s ease, opacity 0.15s ease !important;
}

.dr-lead-popup__form input.wpcf7-submit:hover,
.dr-lead-popup__form input.wpcf7-submit:focus-visible {
    background: var(--dr-popup-red-dark) !important;
    border-color: var(--dr-popup-red-dark) !important;
}

.dr-lead-popup__form .wpcf7 form > p:has(.wpcf7-submit) {
    position: relative;
    display: block;
    margin-top: 4px !important;
}

.dr-lead-popup__form .wpcf7 form > p:has(.wpcf7-submit) .wpcf7-submit {
    width: 100% !important;
    margin-top: 0 !important;
}

/* Native CF7 spinner is dead site-wide (animation:none in header) — hide it */
.dr-lead-popup__form .wpcf7-spinner {
    display: none !important;
    visibility: hidden !important;
}

.dr-lead-popup__form .dr-lead-btn-spinner {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    width: 22px;
    height: 22px;
    margin: 0;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    box-sizing: border-box;
    pointer-events: none;
    z-index: 3;
}

.dr-lead-popup__form.is-sending .dr-lead-btn-spinner {
    display: block;
}

.dr-lead-popup__form.is-sending .wpcf7-submit {
    color: transparent !important;
    cursor: wait !important;
    pointer-events: none !important;
}

.dr-lead-popup__note {
    margin: 8px 0 0;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.35;
    color: var(--dr-popup-muted);
}

.dr-lead-popup__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 0 10px;
    color: var(--dr-popup-muted);
    font-size: 0.72rem;
}

.dr-lead-popup__divider::before,
.dr-lead-popup__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.dr-lead-popup__phone {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    padding: 0.7em 1em;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 8px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.dr-lead-popup__phone:hover,
.dr-lead-popup__phone:focus-visible {
    background: rgba(255, 255, 255, 0.06);
    border-color: #fff;
    outline: none;
}

.dr-lead-popup__phone svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .dr-lead-popup {
        padding: 12px;
        align-items: flex-end;
    }

    .dr-lead-popup__dialog {
        width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 12px 12px;
        padding: 24px 18px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dr-lead-popup,
    .dr-lead-popup__dialog {
        transition: none !important;
    }
}
