/* ── Contact Popup ── */

/* ── Overlay ── */
.nml-cp__overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 16, 31, 0.56);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nml-cp__overlay--visible {
    opacity: 1;
}

/* ── Dialog ── */
/* This element owns the popup's scroll, so it must stay hit-testable: with
   pointer-events:none a touch that lands on its padding falls through to the
   page behind, which then scrolls instead of the popup. Clicking the empty area
   still closes the popup — handled in script.js (e.target === dialog), not by
   letting the click through to the overlay underneath. */
.nml-cp__dialog {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9001;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 40px 24px;
}

.nml-cp__dialog:not([hidden]) {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

/* ── Dialog inner (wraps all content) ── */
.nml-cp__inner {
    position: relative;
    width: 100%;
    max-width: 1022px;
    background: var(--color-bg);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0px 1px 2px 0px #4C83F333;
    border: 2px solid var(--lines-blue, #889CF1);
    pointer-events: auto;
    opacity: 0;
    transform: translateY(24px) scale(0.98);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.nml-cp__dialog--open .nml-cp__inner {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ── Close button ── */
.nml-cp__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #303D60;
    transition: background 0.2s, color 0.2s;
    z-index: 1;
    outline: none!important;
}

.nml-cp__close:hover {
    color: #0B101F;
}

/* ── Section heading ── */
.nml-cp__title {
    margin: 0 0 32px;
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    color: var(--color-text-primary);
    text-align: center;
}

.nml-cp__title-accent {
    color: var(--color-text-accent);
}

/* ── Outer wrapper ── */
.nml-cp__wrap {
    display: grid;
    grid-template-columns: 438px 1fr;
    gap: 64px;
    position: relative;
    overflow: hidden;
    margin: 0 auto;
}

.nml-cp__wrap:after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: calc(100% - 64px);
    margin: 32px 0;
    background: #889CF1;
}

/* ══ LEFT — Platform card ══ */
.nml-cp__platform {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
    padding: 20px 24px;
    box-shadow: 0px 1px 2px 0px #4C83F333;
    position: relative;
    border-radius: 12px;
}

.nml-cp__platform::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    border-radius: 12px;

    background: linear-gradient(
            150.93deg,
            #889CF1 0%,
            #FF4171 107.94%
    );

    -webkit-mask:
            linear-gradient(#fff 0 0) content-box,
            linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;

    pointer-events: none;
}

.nml-cp__platform-media {
    width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-line-light);
}

.nml-cp__platform-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nml-cp__platform-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nml-cp__platform-title {
    margin: 0;
    font-size: 32px;
    line-height: 40px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.nml-cp__platform-text {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

/* checklist */
.nml-cp__checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 8px 0 16px;
    padding: 0;
    list-style: none;
}

.nml-cp__checklist li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.nml-cp__checklist li::before {
    content: '';
    flex-shrink: 0;
    display: inline-block;
    width: 18px;
    height: 18px;
    background-image: url("/wp-content/uploads/2026/06/Icon-50.svg");
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
}

.nml-cp__platform-btn{
    background: var(--color-primary);
    color: var(--color-text-white);
    border: 1px solid var(--color-primary-dark);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    font-size: 16px;
    line-height: 24px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.nml-cp__platform-btn:hover{
    background: var(--color-primary-dark);
}

/* ══ RIGHT — column wrapper ══ */
.nml-cp__right {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* ── Telegram card ── */
.nml-cp__tg-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 20px 24px;
    background: var(--color-bg);
    border: 1px solid var(--color-line);
    box-shadow: 0 1px 2px rgba(76, 131, 243, 0.2);
    border-radius: 8px;
}

/* ── Telegram button override ── */
.nml-cp__tg-btn {
    text-decoration: none;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 10px 24px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.nml-cp__tg-btn span{
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--color-primary);
}

/* ── Divider ── */
.nml-cp__divider {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.nml-cp__divider::before,
.nml-cp__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--color-line-blue);
}

.nml-cp__divider-label {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* ══ RIGHT — Email form ══ */
.nml-cp__form-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px;
    border: 1px solid var(--color-line);
    box-shadow: 0px 1px 2px 0px #4C83F333;
    border-radius: 8px;
}

.nml-cp-tg .nml-cp__form-wrap {
    gap: 6px;
}

.nml-cp__form-title {
    margin: 0 0 6px 0;
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
    color: var(--color-text-primary);
}

.nml-cp__form-text {
    margin: 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: -0.1px;
}

.nml-cp__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--color-line);
}

.nml-cp-tg .nml-cp__form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 10px;
    padding-top: 16px;
    border-top: 1px solid #D5DAFA;
}

/* textarea height override for this block */
.nml-cp__form .nml-textarea {
    min-height: 100px;
}

.nml-cp-tg .nml-cp__form .nml-textarea {
    min-height: 100px;
}

/* ── Form footer ── */
.nml-cp__form-footer {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
}

.nml-cp-tg .nml-cp__form-footer {
    margin-top: 10px;
}

.nml-cp-tg .nml-cp__form-footer:last-child {
    margin-top: 0;
}

.nml-cp-tg .nml-cp__tg-card .nml-cp__form-footer:last-child {
    margin-top: 10px;
}

.nml-cp__response-time {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--color-text-accent);
}

/* ── Loading state ── */
.nml-cp__btn-spinner {
    display: none;
    animation: nml-cp-spin 0.8s linear infinite;
}

.nml-cp__submit-btn{
    text-decoration: none;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    padding: 10px 24px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    cursor: pointer;
}

.nml-cp__submit-btn span{
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    color: var(--color-primary);
}

.nml-cp__submit-btn--loading .nml-cp__btn-icon    { display: none; }
.nml-cp__submit-btn--loading .nml-cp__btn-spinner { display: block; }
.nml-cp__submit-btn--loading {
    opacity: 0.75;
    pointer-events: none;
}

@keyframes nml-cp-spin {
    to { transform: rotate(360deg); }
}

/* Status banner reuses global .nml-alert — only visibility toggle here */
.nml-cp__status[hidden] { display: none; }
.nml-cp__status:not([hidden]) { display: flex; }

@media (max-width: 991px) {
    .nml-cp__dialog {
        padding: 20px;
    }

    /* Bottom sheet. Done with an auto margin, not align-items:flex-end — an
       end-aligned flex item that outgrows a scroll container overflows past the
       container's TOP, and overflow in the start direction is not scrollable,
       so the head of a tall form would be unreachable. An auto margin collapses
       to 0 in that case and the sheet simply scrolls from the top. */
    .nml-cp__inner {
        margin-top: auto;
        padding: 24px 16px 20px;
        border-radius: 12px;
        max-width: 100%;
        transform: translateY(100%);
        transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    }

    .nml-cp__dialog--open .nml-cp__inner {
        transform: translateY(0);
        opacity: 1;
    }

    .nml-cp__title {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 20px;
    }

    .nml-cp__wrap {
        grid-template-columns: 1fr;
        padding: 0;
        gap: 0;
        background: transparent;
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .nml-cp__wrap:after {
        display: none;
    }

    .nml-cp__platform {
        padding: 16px;
    }

    .nml-cp__platform-body {
        gap: 8px;
    }

    .nml-cp__platform-media {
        flex: auto;
        height: 151px;
    }

    .nml-cp__platform-title {
        font-size: 24px;
        line-height: 32px;
    }

    .nml-cp__platform-text {
        font-size: 14px;
        line-height: 20px;
    }

    .nml-cp__checklist {
        margin: 4px 0 12px;
    }

    .nml-cp__checklist li {
        font-size: 14px;
        line-height: 20px;
    }

    .nml-cp__right {
        margin-top: 24px;
        padding-top: 24px;
        border-top: 1px solid #889CF1;
    }

    .nml-cp__tg-card,
    .nml-cp__form-wrap {
        padding: 16px;
        gap: 6px;
    }

    .nml-cp__form {
        margin-top: 14px;
        padding-top: 20px;
    }

    .nml-cp__divider {
        padding: 12px 0;
    }

    .nml-cp__form-title {
        font-size: 24px;
        line-height: 32px;
    }

    .nml-cp__form-text {
        font-size: 14px;
        line-height: 20px;
    }

    .nml-cp__form .nml-textarea {
        height: 182px;
    }

    .nml-cp-tg .nml-cp__form .nml-textarea {
        height: 182px;
    }

    .nml-cp__form-footer {
        flex-direction: column;
        gap: 8px;
    }

    .nml-cp__submit-btn {
        width: 100%;
        justify-content: center;
    }

    .nml-cp-tg .nml-cp__tg-card .nml-cp__form-footer:last-child {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 10px auto 0;
    }
    .nml-cp__close {
        top: 4px;
        right: 4px;
    }
}
