/* ==========================================================================
   Book a demo modal (includes/demo_modal.php)
   Dark two-column layout: client logo showcase (left) + lead form (right).
   ========================================================================== */
.dm {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
}

.dm.is-open {
    display: flex;
}

.dm__overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 10, 20, 0.72);
    backdrop-filter: blur(2px);
}

.dm__dialog {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 980px;
    max-height: 92vh;
    overflow-y: auto;
    background: #092344;
    color: #ffffff;
    border-radius: 18px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.55);
    box-sizing: border-box;
    animation: dm-pop-in 0.25s ease;
}

@keyframes dm-pop-in {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dm__close {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 2;
    background: none;
    border: none;
    font-size: 1.6rem;
    line-height: 1;
    color: #ffffff;
    cursor: pointer;
    padding: 0;
    opacity: 0.75;
    transition: opacity var(--transition);
}

.dm__close:hover {
    opacity: 1;
}

.dm__layout {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}

/* ---------- left: client logo showcase ---------- */
.dm__showcase {
    padding: 36px 32px;
    background: #0A0F18;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.dm__showcase-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    color: #ffffff;
    margin: 0 0 24px;
    max-width: 360px;
}

.dm__logo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.dm__logo {
    display: block;
    height: 56px;
    width: 100%;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
    padding: 12px 16px;
    background: #ffffff;
    border-radius: 8px;
}

/* Same white tile as other logos; extra padding only shrinks the artwork inside. */
.dm__logo[alt="Swiggy logo"],
.dm__logo[alt="Licious logo"] {
    height: 56px;
    padding: 16px 20px;
    object-fit: contain;
    object-position: center;
}

/* ---------- right: lead form ---------- */
.dm__form-col {
    padding: 36px 32px;
}

.dm__title {
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 6px;
}

.dm__subtitle {
    font-size: 0.88rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.6);
    margin: 0 0 24px;
    max-width: 420px;
}

.dm__form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dm__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.dm__row--full {
    grid-template-columns: 1fr;
}

.dm__field {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.dm__label {
    font-size: 0.78rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.dm__input {
    width: 100%;
    box-sizing: border-box;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.dm__input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Keep autofilled fields (name/email/etc.) the same dark style as empty ones
   like Job title, instead of Chrome’s default white fill. */
.dm__input:-webkit-autofill,
.dm__input:-webkit-autofill:hover,
.dm__input:-webkit-autofill:focus {
    -webkit-text-fill-color: #ffffff;
    caret-color: #ffffff;
    transition: background-color 99999s ease-in-out 0s;
    box-shadow: 0 0 0 1000px rgba(9, 35, 68, 0.95) inset;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.dm__input:focus {
    outline: none;
    border-color: #1375E4;
    box-shadow: 0 0 0 3px rgba(19, 117, 228, 0.25);
}

.dm__error {
    display: none;
    font-size: 0.76rem;
    font-weight: 500;
    color: #ff6b6b;
    margin-top: -2px;
}

.dm__field.is-invalid .dm__input,
.dm__field.is-invalid .dm__phone-wrap {
    border-color: #ff6b6b;
}

.dm__field.is-invalid .dm__input:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.dm__field.is-invalid .dm__error {
    display: block;
}

.dm__phone-wrap {
    display: flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.06);
}

.dm__phone-wrap:focus-within {
    border-color: #1375E4;
    box-shadow: 0 0 0 3px rgba(19, 117, 228, 0.25);
}

.dm__country-select {
    flex-shrink: 0;
    max-width: 130px;
    height: 46px;
    padding: 0 10px;
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.04);
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-overflow: ellipsis;
}

.dm__country-select option {
    color: #0E1420;
}

.dm__country-select:focus {
    outline: none;
}

.dm__phone-prefix {
    flex-shrink: 0;
    padding: 0 8px 0 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.75);
}

.dm__input--phone {
    border: none;
    border-radius: 0;
    background: transparent;
    padding-left: 0;
}

.dm__input--phone:focus {
    box-shadow: none;
}

.dm__consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
}

.dm__consent-label input[type="checkbox"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: #1375E4;
    cursor: pointer;
}

.dm__field.is-invalid .dm__consent-label {
    color: #ff6b6b;
}

.dm__contact {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
}

.dm__contact-item a {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

.dm__submit {
    width: 100%;
    min-height: 52px;
    margin-top: 4px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: #1375E4;
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.dm__submit:hover {
    background: #0f63c4;
    transform: translateY(-2px);
}

@media (max-width: 990px) {
    .dm__layout {
        grid-template-columns: 1fr;
    }

    .dm__showcase {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding: 28px 24px;
    }

    .dm__form-col {
        padding: 28px 24px;
    }

    .dm__row {
        grid-template-columns: 1fr;
    }

    .dm__dialog {
        max-height: 90vh;
    }
}

@media (max-width: 600px) {
    .dm__dialog {
        border-radius: 14px;
    }

    .dm__showcase-title {
        font-size: 1.05rem;
    }
}
