/* Support page styles */

.support-page, .support-ui {
    --ink: #0d0918;
    --paper: #f4f0e8;
    --acid: #dd158a;
    --violet: #7c4dff;
    --good: #67e8c2;
    --muted: #aaa5b3;
    --panel: #120d21;
    --line: rgba(255, 255, 255, .14);
}

.support-page {
    width: 100%;
    background-color: #fff !important;
    --support-text: #17131f;
    --support-muted: #6f6878;
    --support-line: rgba(23, 19, 31, .13);
    --support-surface: #f8f7fb;
}

.support-page *, .support-ui * {
    box-sizing: border-box;
}

.support-page button, .support-page input, .support-ui button, .support-ui input {
    font: inherit;
}


/* FAQ heading */
.support-page .quick {
    min-height: 100vh;
    width: 100%;
    padding: 170px clamp(24px, 7vw, 110px) 105px;
    background: #fff;
    color: var(--support-text);
}

.support-page .quick-copy h1 {
    font: 700 clamp(2.7rem, 6.2vw, 5.5rem)/.95 Syne, sans-serif;
    letter-spacing: -.06em;
    margin: 0;
}

.support-page .support-directory-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 34px;
}

.support-page .support-directory-head .quick-copy {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.support-page .support-directory-head .quick-copy h1 {
    margin: 0;
    color: var(--support-text);
    font-family: Syne, sans-serif;
    font-size: clamp(3rem, 6vw, 6rem);
    font-weight: 700;
    line-height: .88;
    letter-spacing: -.06em;
    text-transform: uppercase;
    overflow-wrap: break-word;
    text-wrap: balance;
}


/* Search field */
.support-page .support-search {
    width: clamp(260px, 28vw, 420px);
    flex: 0 1 420px;
    min-width: 0;
    margin: 0;
}

.support-page .support-search-box {
    justify-content: flex-end;
    align-items: center;
    position: relative;
    display: block;
    width: 100%;
}

.support-page .support-search-box svg {
    position: absolute;
    top: 50%;
    left: 17px;
    right: auto;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: #756e7e;
    stroke-width: 2;
    pointer-events: none;
}

.support-page .support-search-box input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 48px 0 45px;
    border: 1px solid var(--support-line);
    border-radius: 999px;
    outline: none;
    color: var(--support-text);
    background: #fff;
    font: 400 1rem "DM Sans", sans-serif;
    box-sizing: border-box;
    transition: border-color .2s, background .2s, box-shadow .2s;
}

.support-page .support-search-box input:focus {
    border-color: var(--violet);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(124, 77, 255, .10);
}

.support-page .support-search-box input::placeholder {
    color: #928b9a;
}

.support-page .search-clear {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #6d6672;
    font-size: 1.2rem;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    right: 8px;
}

.support-page .search-clear.visible {
    opacity: 1;
    pointer-events: auto;
}

.support-page .search-clear:hover {
    color: #fff;
    background: var(--violet);
}


/* FAQ content */
.support-page .quick-grid {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 8vw;
}

.support-page .quick h2 {
    font: 700 clamp(2.6rem, 5vw, 5.5rem) / 0.92 Syne;
    letter-spacing: -0.06em;
    margin: 18px 0;
}

.support-page .faq {
    border-top: 1px solid rgba(13, 9, 24, 0.16);
}

.support-page .faq-item {
    border-bottom: 1px solid rgba(13, 9, 24, 0.16);
}

.support-page .faq-q {
    width: 100%;
    background: none;
    border: 0;
    padding: 23px 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    font: 600 1.04rem Syne;
    cursor: pointer;
    color: #0d0918;
}

.support-page .faq-q span:last-child {
    font: 400 1.5rem;
    transition: 0.25s;
}

.support-page .faq-a {
    overflow: hidden;
    color: #635d69;
    line-height: 1.65;
    max-height: 0;
    transition: max-height .35s ease;
}

.support-page .faq-a p {
    margin: 0;
    padding: 0 45px 24px 0;
    overflow-wrap: anywhere;
}

.support-page .faq-item.open .faq-a {
    max-height: none;
}

.support-page .faq-item.open .faq-q span:last-child {
    transform: rotate(45deg);
}

.support-page .quick>.quick-grid {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
}

.support-page .quick>.quick-grid .faq {
    width: 100%;
}

.support-page .quick>.quick-grid .faq-q, .support-page .quick>.quick-grid .faq-a, .support-page .quick>.quick-grid .faq-a p {
    width: 100%;
}

.support-page .quick>.quick-grid .faq-q {
    padding: 25px 0;
}

.support-page .quick>.quick-grid .faq-a p {
    padding-right: 64px;
}

.support-page .faq-item.search-hidden {
    display: none;
}

.support-page .faq-empty {
    display: none;
    padding: 34px 18px;
    color: #635d69;
    text-align: center;
    border-bottom: 1px solid rgba(13, 9, 24, 0.16);
}

.support-page .faq-empty.visible {
    display: block;
}

.support-page .faq-q:focus-visible, .support-page .support-search-box input:focus-visible {
    outline: 2px solid var(--violet);
    outline-offset: 3px;
}

.support-page .quick .faq-heading {
    margin: 0;
    font: inherit;
    font-size: inherit;
    line-height: inherit;
}


/* Zelly chat */
.support-ui .zelly-launcher {
    position: fixed;
    right: 3%;
    bottom: 5%;
    z-index: 42;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px 14px 15px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, var(--acid), var(--violet));
    box-shadow: 0 18px 45px rgba(70, 30, 150, 0.38);
    font-weight: 700;
    transition: transform 0.25s ease, filter 0.25s ease;
    cursor: pointer;
}

.support-ui .zelly-launcher:hover {
    transform: translateX(-5px);
    filter: brightness(1.1);
}

.support-ui .zelly-launcher svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    display: block;
}

.support-ui .zelly-overlay {
    position: fixed;
    inset: 0;
    z-index: 43;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.support-ui .zelly-overlay.open {
    opacity: 1;
    visibility: visible;
}

.support-ui .zelly-panel {
    position: fixed;
    top: auto;
    right: 3%;
    bottom: 15px;
    z-index: 44;
    width: min(390px, calc(100vw - 48px));
    height: min(547px, calc(100dvh - 48px));
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    color: #fff;
    border: 1px solid rgba(225, 211, 255, 0.2);
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(25, 12, 49, 0.98), rgba(12, 8, 25, 0.98));
    box-shadow: 0 30px 80px rgba(5, 2, 15, 0.58), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transform: translateX(calc(100% + 40px));
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, visibility 0s linear 0.35s;
    font-family: "DM Sans", sans-serif;
}

.support-ui .zelly-panel.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.2s ease, visibility 0s;
}

.support-ui .zelly-head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.025);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.support-ui .zelly-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--acid), var(--violet));
    box-shadow: 0 10px 30px rgba(124, 77, 255, 0.3);
    font: 800 1.25rem Syne;
}

.support-ui .zelly-title {
    min-width: 0;
    flex: 1;
}

.support-ui .zelly-title strong {
    display: block;
    font: 700 1.05rem Syne;
}

.support-ui .zelly-title small {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 4px;
    color: var(--muted);
}

.support-ui .zelly-title small::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--good);
    box-shadow: 0 0 12px var(--good);
    flex: 0 0 auto;
}

.support-ui .zelly-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.support-ui .zelly-close:hover {
    transform: rotate(90deg);
    border-color: rgba(221, 21, 138, 0.7);
    background: rgba(221, 21, 138, 0.16);
}

.support-ui .zelly-messages {
    overflow-y: auto;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scroll-behavior: smooth;
}

.support-ui .zelly-message {
    max-width: 84%;
    padding: 13px 15px;
    border-radius: 16px;
    font-size: 0.9rem;
    line-height: 1.55;
    animation: zellyMessage 0.25s ease both;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.support-ui .zelly-message.bot {
    align-self: flex-start;
    color: #ded9e5;
    background: rgba(255, 255, 255, 0.075);
    border: 1px solid var(--line);
    border-bottom-left-radius: 4px;
}

.support-ui .zelly-message.user {
    align-self: flex-end;
    color: #fff;
    background: linear-gradient(135deg, var(--acid), var(--violet));
    border-bottom-right-radius: 4px;
}

.support-ui .zelly-quick {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0 22px 14px;
}

.support-ui .zelly-quick button {
    padding: 9px 12px;
    border: 1px solid rgba(124, 77, 255, 0.45);
    border-radius: 999px;
    color: #dcd6e7;
    background: rgba(124, 77, 255, 0.09);
    font-size: 0.78rem;
}

.support-ui .zelly-quick button:hover {
    color: #fff;
    border-color: var(--acid);
}

.support-ui .zelly-form {
    padding: 16px;
    display: flex;
    gap: 10px;
    border-top: 1px solid var(--line);
    background: rgba(8, 5, 17, 0.78);
}

.support-ui .zelly-form input {
    min-width: 0;
    flex: 1;
    padding: 13px 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    outline: none;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.support-ui .zelly-form input:focus {
    border-color: var(--violet);
}

.support-ui .zelly-send {
    width: 48px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, var(--acid), var(--violet));
    font-size: 1.15rem;
}

.support-ui .zelly-avatar img {
    width: 33px;
    height: 33px;
    object-fit: contain;
}

.support-ui .zelly-form button {
    cursor: pointer;
}

.support-ui .zelly-panel[aria-hidden="true"], .support-ui .zelly-overlay[aria-hidden="true"] {
    pointer-events: none;
}

.support-ui .zelly-close:focus-visible, .support-ui .zelly-launcher:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}


/* Arabic layout */
.support-ui[dir="rtl"] .zelly-head, .support-ui[dir="rtl"] .zelly-title {
    text-align: right;
}

.support-ui[dir="rtl"] .zelly-panel, .support-ui[dir="rtl"] .zelly-launcher {
    right: auto;
    left: 3%;
}

.support-ui[dir="rtl"] .zelly-panel {
    transform: translateX(calc(-100% - 40px));
}

.support-ui[dir="rtl"] .zelly-panel.open {
    transform: translateX(0);
}

.support-ui[dir="rtl"] .zelly-message.bot {
    align-self: flex-start;
}

.support-ui[dir="rtl"] .zelly-message.user {
    align-self: flex-end;
}

html[dir="rtl"] .support-page .support-search-box input {
    direction: rtl;
    text-align: right;
    padding-right: 45px;
    padding-left: 48px;
}

html[dir="rtl"] .support-page .support-search-box svg {
    left: auto;
    right: 17px;
}

html[dir="rtl"] .support-page .search-clear {
    right: auto;
    left: 8px;
}

/* Responsive styles */

@media (max-width: 900px) {
    .support-page .quick-grid {
        grid-template-columns: 1fr;
    }

    .support-page .quick {
        padding-top: 125px;
    }

    .support-page .support-directory-head {
        align-items: stretch;
    }

    .support-page .support-directory-head .quick-copy h1 {
        font-size: clamp(3rem, 9vw, 5.2rem);
    }

    .support-page .support-search {
        width: min(100%, 420px);
        flex: none;
        align-self: flex-end;
    }

}

@media (max-width: 650px) {
    .support-page .quick {
        padding: 112px 18px 75px;
    }

    .support-page .support-directory-head {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .support-page .support-directory-head .quick-copy h1 {
        font-size: clamp(2.6rem, 11vw, 4.2rem);
        line-height: .92;
        overflow-wrap: anywhere;
    }

    .support-page .support-search {
        width: 100%;
        max-width: none;
        align-self: stretch;
    }

    .support-page .support-search-box input {
        width: 100%;
        height: 48px;
    }

}

@media (max-width: 620px) {
    .support-page .quick-grid {
        gap: 42px;
    }

    .support-ui .zelly-launcher {
        top: auto;
        bottom: 22px;
        padding: 13px;
        border-radius: 16px 0 0 16px;
    }

    .support-ui .zelly-launcher span {
        display: none;
    }

    .support-ui .zelly-panel {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        height: min(647px, calc(100dvh - 24px));
        border-radius: 16px;
    }

}

@media (max-width: 560px) {
    .support-page .quick>.quick-grid .faq-q {
        padding: 21px 0;
        font-size: 0.96rem;
    }

    .support-page .quick>.quick-grid .faq-a p {
        padding-right: 20px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .support-page .faq-a, .support-ui .zelly-panel, .support-ui .zelly-overlay {
        transition: none !important;
    }

}
