/* Reusable customer-service dialog used by public product pages. */
.contact-modal,
.contact-modal * {
    box-sizing: border-box;
}

body.contact-modal-open {
    overflow: hidden;
}

.contact-modal {
    --contact-ink: #11213f;
    --contact-muted: #687894;
    --contact-blue: #2778ee;
    --contact-cyan: #4ed8ef;
    --contact-line: #dce7f5;
    position: fixed;
    z-index: 100500;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(12px, 3vw, 32px);
    color: var(--contact-ink);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .24s ease, visibility .24s ease;
}

.contact-modal[hidden] {
    display: none !important;
}

.contact-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.contact-modal-backdrop {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 50% 0%, rgba(66, 141, 255, .16), transparent 42%),
        rgba(5, 14, 32, .72);
    -webkit-backdrop-filter: blur(14px) saturate(1.08);
    backdrop-filter: blur(14px) saturate(1.08);
    cursor: pointer;
}

.contact-modal-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(1080px, 100%);
    max-height: min(780px, calc(100vh - 32px));
    max-height: min(780px, calc(100dvh - 32px));
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 28px;
    background: #f7faff;
    box-shadow: 0 32px 90px rgba(2, 12, 35, .4), 0 8px 26px rgba(10, 54, 126, .22);
    transform: translateY(18px) scale(.965);
    transition: transform .3s cubic-bezier(.2, .75, .25, 1);
}

.contact-modal.is-open .contact-modal-dialog {
    transform: translateY(0) scale(1);
}

.contact-modal-header {
    position: relative;
    display: flex;
    flex: 0 0 auto;
    min-height: 158px;
    overflow: hidden;
    padding: 24px clamp(26px, 5vw, 56px);
    color: #fff;
    background:
        linear-gradient(122deg, #091a3d 0%, #12376d 49%, #1864ba 100%);
}

.contact-modal-header::before {
    position: absolute;
    z-index: 1;
    inset: -70% -25%;
    background: linear-gradient(112deg, transparent 42%, rgba(125, 228, 255, .18) 49%, rgba(125, 228, 255, .04) 53%, transparent 61%);
    content: '';
    pointer-events: none;
    transform: translateX(-30%) rotate(-4deg);
    animation: contactModalHeaderSweep 9s cubic-bezier(.35, .05, .2, 1) infinite;
}

.contact-modal-header::after {
    position: absolute;
    z-index: 0;
    right: -12%;
    bottom: -72%;
    width: 74%;
    height: 220%;
    border: 1px solid rgba(131, 226, 255, .2);
    border-radius: 50%;
    content: '';
    transform: rotate(-24deg);
    animation: contactModalHeaderRing 12s ease-in-out infinite alternate;
}

.contact-modal-header-grid {
    position: absolute;
    z-index: 0;
    inset: 0;
    opacity: .3;
    background-image: linear-gradient(rgba(125, 197, 255, .1) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 197, 255, .1) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, .55) 58%, transparent 100%);
    animation: contactModalGridDrift 18s linear infinite;
}

.contact-modal-aurora {
    position: absolute;
    z-index: 0;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    filter: blur(2px);
    opacity: .36;
    pointer-events: none;
    animation: contactModalAurora 8s ease-in-out infinite alternate;
}

.contact-modal-aurora--one {
    top: -138px;
    left: 24%;
    background: radial-gradient(circle, rgba(92, 223, 255, .55), rgba(92, 223, 255, 0) 68%);
}

.contact-modal-aurora--two {
    right: 13%;
    bottom: -162px;
    background: radial-gradient(circle, rgba(143, 125, 255, .45), rgba(143, 125, 255, 0) 68%);
    animation-delay: -3s;
}

@keyframes contactModalAurora {
    from { transform: translate3d(-8px, 5px, 0) scale(.94); }
    to { transform: translate3d(12px, -8px, 0) scale(1.08); }
}

.contact-modal-header-copy {
    position: relative;
    z-index: 2;
    max-width: min(600px, 74%);
}

.contact-modal-kicker {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(218, 243, 255, .78);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    line-height: 1;
}

.contact-modal-status-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #69e5bd;
    box-shadow: 0 0 0 5px rgba(105, 229, 189, .12), 0 0 18px rgba(105, 229, 189, .85);
    animation: contactModalStatusPulse 2.4s ease-in-out infinite;
}

.contact-modal-status-label {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    margin-left: 5px;
    padding: 0 9px;
    border: 1px solid rgba(124, 232, 216, .35);
    border-radius: 999px;
    color: #a9f8e1;
    font-size: 10px;
    letter-spacing: .03em;
}

.contact-modal-header h2 {
    margin: 14px 0 6px;
    color: #fff;
    font-size: clamp(26px, 3.4vw, 34px);
    font-weight: 800;
    letter-spacing: -.035em;
    line-height: 1.06;
}

.contact-modal-header p {
    margin: 0;
    color: rgba(224, 239, 255, .78);
    font-size: clamp(12px, 1.35vw, 14px);
    line-height: 1.5;
}

.contact-modal-header-orbit {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: clamp(68px, 11vw, 136px);
    width: 116px;
    height: 116px;
    transform: translateY(-50%);
    opacity: .92;
}

.contact-modal-orbit-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(112, 221, 255, .42);
    border-radius: 50%;
    transform: rotate(-20deg) scaleX(.72);
    animation: contactModalOrbit 16s linear infinite;
}

.contact-modal-orbit-ring--inner {
    inset: 15px;
    border-color: rgba(164, 237, 255, .6);
    transform: rotate(34deg) scaleX(.74);
    animation-direction: reverse;
    animation-duration: 11s;
}

@keyframes contactModalOrbit {
    from { transform: rotate(0deg) scaleX(.72); }
    to { transform: rotate(360deg) scaleX(.72); }
}

.contact-modal-orbit-ring--inner {
    animation-name: contactModalOrbitInner;
}

@keyframes contactModalOrbitInner {
    from { transform: rotate(34deg) scaleX(.74); }
    to { transform: rotate(-326deg) scaleX(.74); }
}

.contact-modal-orbit-core {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border: 1px solid rgba(145, 232, 255, .7);
    border-radius: 17px;
    color: #d8fbff;
    background: linear-gradient(145deg, rgba(82, 202, 255, .45), rgba(45, 101, 214, .55));
    box-shadow: 0 0 28px rgba(76, 194, 255, .38), inset 0 1px 0 rgba(255, 255, 255, .36);
    font-size: 24px;
    transform: translate(-50%, -50%);
}

.contact-modal-orbit-core::after {
    position: absolute;
    inset: -9px;
    border: 1px solid rgba(132, 231, 255, .34);
    border-radius: 21px;
    content: '';
    pointer-events: none;
    animation: contactModalCorePulse 2.8s ease-out infinite;
}

.contact-modal-close {
    position: absolute;
    z-index: 3;
    top: 22px;
    right: 24px;
    display: grid;
    width: 42px;
    height: 42px;
    padding: 0;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 14px;
    color: rgba(255, 255, 255, .9);
    background: rgba(255, 255, 255, .1);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.contact-modal-close:hover {
    border-color: rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .2);
    transform: rotate(4deg);
}

.contact-modal-body {
    min-height: 0;
    overflow: auto;
    padding: clamp(22px, 3.6vw, 34px) clamp(18px, 4.2vw, 48px) 26px;
    background:
        radial-gradient(circle at 100% 0%, rgba(108, 189, 255, .09), transparent 34%),
        #f7faff;
    scrollbar-color: #b7cae4 transparent;
    scrollbar-width: thin;
}

.contact-modal-body::-webkit-scrollbar {
    width: 8px;
}

.contact-modal-body::-webkit-scrollbar-thumb {
    border: 2px solid #f7faff;
    border-radius: 999px;
    background: #b7cae4;
}

.contact-modal-group + .contact-modal-group {
    margin-top: 28px;
    padding-top: 0;
}

.contact-modal-group-heading {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    margin-bottom: 17px;
}

.contact-modal-group-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid #bfdbfb;
    border-radius: 13px;
    color: #2778ee;
    background: linear-gradient(145deg, #eaf4ff, #d9ecff);
    box-shadow: 0 8px 18px rgba(52, 126, 224, .1);
    font-size: 18px;
}

.contact-modal-group-copy {
    min-width: 0;
}

.contact-modal-group-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.contact-modal-group h3 {
    margin: 0;
    color: var(--contact-ink);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.contact-modal-group-count {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 9px;
    border-radius: 999px;
    color: #3177c8;
    background: #e8f2ff;
    font-size: 11px;
    font-weight: 700;
}

.contact-modal-group-copy p {
    overflow: hidden;
    margin: 5px 0 0;
    color: var(--contact-muted);
    font-size: 12px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-modal.is-open .contact-modal-group {
    animation: contactModalGroupEnter .45s cubic-bezier(.2, .75, .25, 1) both;
}

.contact-modal.is-open .contact-modal-group:nth-child(2) {
    animation-delay: .08s;
}

.contact-modal.is-open .contact-modal-member {
    animation: contactModalMemberEnter .5s cubic-bezier(.2, .75, .25, 1) both;
}

.contact-modal.is-open .contact-modal-member:nth-child(1) { animation-delay: .06s; }
.contact-modal.is-open .contact-modal-member:nth-child(2) { animation-delay: .1s; }
.contact-modal.is-open .contact-modal-member:nth-child(3) { animation-delay: .14s; }
.contact-modal.is-open .contact-modal-member:nth-child(4) { animation-delay: .18s; }
.contact-modal.is-open .contact-modal-member:nth-child(5) { animation-delay: .22s; }
.contact-modal.is-open .contact-modal-member:nth-child(6) { animation-delay: .26s; }
.contact-modal.is-open .contact-modal-member:nth-child(7) { animation-delay: .3s; }
.contact-modal.is-open .contact-modal-member:nth-child(8) { animation-delay: .34s; }

@keyframes contactModalHeaderSweep {
    0%, 18% { transform: translateX(-34%) rotate(-4deg); opacity: 0; }
    42% { opacity: .9; }
    72%, 100% { transform: translateX(34%) rotate(-4deg); opacity: 0; }
}

@keyframes contactModalHeaderRing {
    from { transform: rotate(-24deg) scale(.96); opacity: .62; }
    to { transform: rotate(-16deg) scale(1.04); opacity: 1; }
}

@keyframes contactModalGridDrift {
    from { background-position: 0 0; }
    to { background-position: 34px 34px; }
}

@keyframes contactModalStatusPulse {
    0%, 100% { box-shadow: 0 0 0 5px rgba(105, 229, 189, .12), 0 0 18px rgba(105, 229, 189, .7); }
    50% { box-shadow: 0 0 0 8px rgba(105, 229, 189, .04), 0 0 25px rgba(105, 229, 189, 1); }
}

@keyframes contactModalCorePulse {
    0% { opacity: .7; transform: scale(.82); }
    70%, 100% { opacity: 0; transform: scale(1.28); }
}

@keyframes contactModalGroupEnter {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes contactModalMemberEnter {
    from { opacity: 0; transform: translateY(10px) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.contact-modal-members {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.contact-modal-member {
    min-width: 0;
    padding: 16px;
    border: 1px solid #e0eaf6;
    border-radius: 18px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 9px 22px rgba(22, 65, 125, .06);
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.contact-modal-member:hover {
    border-color: #b9d7fa;
    box-shadow: 0 14px 28px rgba(32, 101, 191, .12);
    transform: translateY(-2px);
}

.contact-modal-member-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    margin-bottom: 14px;
}

.contact-modal-member-avatar {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border: 1px solid #b9d9ff;
    border-radius: 13px;
    color: #287df0;
    background: linear-gradient(145deg, #eaf4ff, #d7ebff);
    font-size: 17px;
}

.contact-modal-member--female .contact-modal-member-avatar {
    border-color: #f6c3dc;
    color: #db5c96;
    background: linear-gradient(145deg, #fff0f7, #ffe1ee);
}

.contact-modal-member-copy {
    min-width: 0;
}

.contact-modal-member-copy h4 {
    overflow: hidden;
    margin: 0 0 4px;
    color: #1b2d50;
    font-size: 15px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-modal-member-copy > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #7990ad;
    font-size: 11px;
}

.contact-modal-member-copy > span i {
    color: #36c79a;
    font-size: 7px;
}

.contact-modal-channels {
    display: grid;
    gap: 8px;
}

.contact-modal-channel {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 9px;
    min-height: 48px;
    padding: 7px 10px;
    border: 1px solid #e3ebf5;
    border-radius: 12px;
    color: #314769;
    text-decoration: none;
    background: #fbfdff;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

a.contact-modal-channel:hover {
    border-color: #9fc8f8;
    color: #1c66d7;
    background: #f0f7ff;
    box-shadow: 0 7px 14px rgba(43, 121, 229, .1);
    transform: translateX(2px);
}

.contact-modal-channel--disabled {
    opacity: .62;
}

.contact-modal-channel-icon {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    place-items: center;
    border-radius: 9px;
    color: #287ff1;
    background: #e7f2ff;
    font-size: 14px;
}

.contact-modal-channel--telegram .contact-modal-channel-icon {
    color: #168bd1;
    background: #e2f4ff;
}

.contact-modal-channel--qq .contact-modal-channel-icon {
    color: #526fdc;
    background: #e9edff;
}

.contact-modal-channel--skype .contact-modal-channel-icon {
    color: #159ad1;
    background: #e1f7ff;
}

.contact-modal-channel-copy {
    display: grid;
    min-width: 0;
    gap: 2px;
    flex: 1 1 auto;
}

.contact-modal-channel-copy strong,
.contact-modal-channel-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-modal-channel-copy strong {
    color: inherit;
    font-size: 12px;
    font-weight: 750;
}

.contact-modal-channel-copy small {
    color: #8091a9;
    font-size: 11px;
}

.contact-modal-channel-arrow {
    flex: 0 0 auto;
    color: #91a8c4;
    font-size: 14px;
    transition: transform .2s ease, color .2s ease;
}

a.contact-modal-channel:hover .contact-modal-channel-arrow {
    color: #287ff1;
    transform: translateX(2px);
}

.contact-modal-empty {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 15px;
    border: 1px dashed #cbdced;
    border-radius: 13px;
    color: #7185a0;
    background: rgba(255, 255, 255, .6);
    font-size: 12px;
}

.contact-modal-empty > i {
    color: #7ea5d5;
    font-size: 18px;
}

.contact-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    gap: 18px;
    min-height: 72px;
    padding: 14px clamp(18px, 4.2vw, 48px);
    border-top: 1px solid #e0eaf5;
    background: rgba(255, 255, 255, .92);
}

.contact-modal-footer-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.contact-modal-footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #607592;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.contact-modal-footer-links a:hover {
    border-color: #c9def7;
    color: #2475df;
    background: #f0f7ff;
}

.contact-modal-footer-links a i {
    color: #4a91ec;
    font-size: 14px;
}

.contact-modal-footer-links .contact-modal-phone {
    padding-right: 15px;
    padding-left: 15px;
    border-color: #b7d6fb;
    border-radius: 999px;
    color: #2778e8;
    background: #f1f7ff;
    font-size: 13px;
}

.contact-modal-footer-status {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 7px;
    color: #8a9ab0;
    font-size: 11px;
    white-space: nowrap;
}

.contact-modal-footer-status i {
    color: #39bd91;
}

.contact-modal :is(button, a):focus-visible,
.contact-modal-dialog:focus-visible {
    outline: 3px solid rgba(51, 132, 243, .48);
    outline-offset: 3px;
}

@media (max-width: 760px) {
    .contact-modal {
        padding: 10px;
    }

    .contact-modal-dialog {
        max-height: calc(100vh - 20px);
        max-height: calc(100dvh - 20px);
        border-radius: 22px;
    }

    .contact-modal-header {
        min-height: 136px;
        padding: 21px 22px 22px;
    }

    .contact-modal-header-copy {
        max-width: 88%;
    }

    .contact-modal-header-orbit {
        right: 30px;
        opacity: .42;
        transform: translateY(-42%) scale(.72);
    }

    .contact-modal-close {
        top: 16px;
        right: 16px;
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .contact-modal-body {
        padding: 21px 16px 22px;
    }

    .contact-modal-members {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .contact-modal-member {
        padding: 13px;
    }

    .contact-modal-footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 13px 16px 15px;
    }
}

@media (max-width: 470px) {
    .contact-modal-header {
        min-height: 126px;
        padding: 20px 19px 21px;
    }

    .contact-modal-kicker {
        font-size: 9px;
        letter-spacing: .1em;
    }

    .contact-modal-status-label {
        display: none;
    }

    .contact-modal-header h2 {
        margin-top: 13px;
        font-size: 25px;
    }

    .contact-modal-header p {
        max-width: 225px;
        font-size: 12px;
    }

    .contact-modal-header-orbit {
        right: -3px;
        transform: translateY(-36%) scale(.54);
    }

    .contact-modal-group-heading {
        align-items: flex-start;
    }

    .contact-modal-members {
        grid-template-columns: 1fr;
    }

    .contact-modal-footer-links {
        width: 100%;
        gap: 5px;
    }

    .contact-modal-footer-links a {
        padding: 0 9px;
    }

    .contact-modal-footer-links .contact-modal-phone {
        width: 100%;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-modal,
    .contact-modal-dialog,
    .contact-modal-close,
    .contact-modal-member,
    .contact-modal-channel,
    .contact-modal-channel-arrow,
    .contact-modal-footer-links a {
        transition: none !important;
    }

    .contact-modal-aurora {
        animation: none !important;
    }

    .contact-modal-header::before,
    .contact-modal-header::after,
    .contact-modal-header-grid,
    .contact-modal-status-dot,
    .contact-modal-orbit-core::after,
    .contact-modal-group,
    .contact-modal-member {
        animation: none !important;
    }

    .contact-modal-orbit-ring {
        animation: none !important;
    }
}
