.dq-popup-open {
    overflow: hidden;
}

.dq-lead-popup {
    width: min(650px, calc(100% - 32px));
    max-height: min(90dvh, 820px);
    margin: auto;
    padding: 0;
    overflow: hidden auto;
    border: 0;
    border-radius: 22px;
    background: #fff;
    color: var(--dq-text);
    box-shadow: 0 28px 80px rgba(4, 60, 18, .28);
}

.dq-lead-popup::backdrop {
    background: rgba(3, 31, 11, .68);
    backdrop-filter: blur(4px);
}

.dq-lead-popup__shell {
    position: relative;
    padding: clamp(26px, 5vw, 44px);
}

.dq-lead-popup__shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 6px;
    background: linear-gradient(90deg, var(--dq-primary) 0 68%, var(--dq-accent) 68%);
}

.dq-lead-popup__close {
    position: absolute;
    z-index: 2;
    top: 16px;
    right: 16px;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--dq-border);
    border-radius: 50%;
    background: #fff;
    color: var(--dq-primary-deep);
    font: 400 30px/1 Arial, sans-serif;
    cursor: pointer;
    transition: border-color .2s ease, color .2s ease, transform .2s ease;
}

.dq-lead-popup__close:hover {
    border-color: var(--dq-accent);
    color: var(--dq-accent);
    transform: rotate(6deg);
}

.dq-lead-popup__heading {
    padding-right: 48px;
    margin-bottom: 24px;
}

.dq-lead-popup__eyebrow {
    display: inline-flex;
    margin-bottom: 9px;
    color: var(--dq-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .14em;
}

.dq-lead-popup h2 {
    margin: 0 0 10px;
    color: var(--dq-primary);
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.18;
}

.dq-lead-popup__heading p {
    max-width: 540px;
    margin: 0;
    color: var(--dq-muted);
    line-height: 1.65;
}

.dq-lead-popup .dqc-contact-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    max-width: none;
}

.dq-lead-popup .dqc-contact-form > p {
    margin: 0;
}

.dq-lead-popup .dqc-contact-form > p:nth-of-type(4),
.dq-lead-popup .dqc-contact-form > p:nth-of-type(5),
.dq-lead-popup .dqc-contact-form > p:nth-of-type(6),
.dq-lead-popup .dqc-contact-form > .dqc-contact-success,
.dq-lead-popup .dqc-contact-form > button {
    grid-column: 1 / -1;
}

.dq-lead-popup .dqc-contact-form label {
    display: grid;
    gap: 7px;
    color: var(--dq-primary-deep);
    font-size: 14px;
    font-weight: 600;
}

.dq-lead-popup .dqc-contact-form input,
.dq-lead-popup .dqc-contact-form textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid var(--dq-border);
    border-radius: 10px;
    background: var(--dq-primary-soft, #f7fbf8);
    color: var(--dq-text);
    font: inherit;
    font-weight: 400;
}

.dq-lead-popup .dqc-contact-form textarea {
    min-height: 96px;
    resize: vertical;
}

.dq-lead-popup .dqc-contact-form input:focus,
.dq-lead-popup .dqc-contact-form textarea:focus {
    border-color: var(--dq-primary);
    outline: 3px solid color-mix(in srgb, var(--dq-primary) 16%, transparent);
}

.dq-lead-popup .dqc-contact-form .dq-btn {
    width: 100%;
    min-height: 50px;
    border-color: var(--dq-primary);
    border-radius: 10px;
    background: var(--dq-primary);
    color: #fff;
    cursor: pointer;
}

.dq-lead-popup .dqc-contact-form .dq-btn:hover {
    border-color: var(--dq-primary-hover);
    background: var(--dq-primary-hover);
}

@media (max-width: 600px) {
    .dq-lead-popup {
        width: calc(100% - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: 16px;
    }

    .dq-lead-popup__shell {
        padding: 28px 18px 22px;
    }

    .dq-lead-popup__close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
    }

    .dq-lead-popup__heading {
        padding-right: 38px;
        margin-bottom: 20px;
    }

    .dq-lead-popup .dqc-contact-form {
        grid-template-columns: 1fr;
        gap: 13px;
    }

    .dq-lead-popup .dqc-contact-form > p,
    .dq-lead-popup .dqc-contact-form > button {
        grid-column: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dq-lead-popup__close {
        transition: none;
    }
}
