/* ProAths Support Button V1.6.4
 * Stack order: Zalo native -> FAQ (?) -> theme Back to top.
 * ProAths UI uses a minimum text size of 16px.
 */
:root {
    --pa-stack-right: 24px;
    --pa-cart-shift: 0px;
    --pa-support-size: 48px;
    --pa-support-bottom: 80px;
    --pa-zalo-native-size: 70px;
    --pa-zalo-right: 13px;
    --pa-zalo-bottom: 140px;
    --pa-support-panel-width: 380px;
    --pa-support-navy: #0d2968;
    --pa-support-border: #e4e8ef;
}

.proaths-support,
.proaths-support *,
.proaths-support__zalo-tooltip {
    box-sizing: border-box;
}

/* ---------- Fixed launchers ---------- */
.proaths-support__launcher {
    position: fixed !important;
    right: calc(var(--pa-stack-right) + var(--pa-cart-shift)) !important;
    bottom: var(--pa-support-bottom) !important;
    left: auto !important;
    top: auto !important;
    z-index: 2147483001;
    width: var(--pa-support-size) !important;
    min-width: var(--pa-support-size) !important;
    max-width: var(--pa-support-size) !important;
    height: var(--pa-support-size) !important;
    min-height: var(--pa-support-size) !important;
    max-height: var(--pa-support-size) !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #d9e0ec !important;
    border-radius: 50% !important;
    background: #fff !important;
    color: var(--pa-support-navy) !important;
    box-shadow: 0 5px 16px rgba(8, 25, 61, .16) !important;
    font: inherit !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    overflow: hidden !important;
    transform: none !important;
    transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease !important;
}

.proaths-support__launcher > span {
    display: block;
    margin: 0;
    padding: 0;
    color: inherit;
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    transform: none !important;
}

.proaths-support__launcher::before,
.proaths-support__launcher::after,
.proaths-support__close::before,
.proaths-support__close::after,
.proaths-support__question::before,
.proaths-support__question::after,
.proaths-support__contact::before,
.proaths-support__contact::after,
.proaths-support__all::before,
.proaths-support__all::after,
.proaths-support__link::before,
.proaths-support__link::after {
    content: none !important;
    display: none !important;
}

.proaths-support__launcher:hover,
.proaths-support__launcher:focus-visible,
.proaths-support__launcher[aria-expanded="true"] {
    border-color: #b8c4d8 !important;
    background: #f5f7fb !important;
    color: var(--pa-support-navy) !important;
    box-shadow: 0 6px 18px rgba(8, 25, 61, .22) !important;
    transform: none !important;
}

/* ---------- Tooltips ---------- */
.proaths-support__launcher-tooltip,
.proaths-support__zalo-tooltip {
    position: fixed;
    z-index: 2147483646;
    width: max-content;
    max-width: 260px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #111;
    color: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .14);
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: none !important;
    transition: opacity 120ms ease, visibility 120ms ease !important;
}

.proaths-support__launcher-tooltip {
    right: calc(var(--pa-stack-right) + var(--pa-cart-shift) + var(--pa-support-size) + 10px);
    bottom: calc(var(--pa-support-bottom) + 5px);
}

.proaths-support__zalo-tooltip {
    right: calc(var(--pa-zalo-right) + var(--pa-cart-shift) + var(--pa-zalo-native-size) + 8px);
    bottom: calc(var(--pa-zalo-bottom) + 17px);
}

.proaths-support__launcher:hover + .proaths-support__launcher-tooltip,
.proaths-support__launcher:focus-visible + .proaths-support__launcher-tooltip,
body .zalo-chat-widget:hover + .proaths-support__zalo-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ---------- FAQ panel ---------- */
.proaths-support__panel {
    position: fixed;
    right: calc(var(--pa-stack-right) + var(--pa-cart-shift));
    bottom: calc(var(--pa-zalo-bottom) + var(--pa-zalo-native-size) + 12px);
    z-index: 2147483000;
    width: min(var(--pa-support-panel-width), 90vw);
    max-height: min(640px, calc(100vh - 240px));
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--pa-support-border);
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(8, 25, 61, .18);
    color: #111;
    font-family: inherit;
    font-size: 16px;
}

.proaths-support__panel[hidden],
.proaths-support__answer[hidden] {
    display: none !important;
}

.proaths-support__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    padding: 14px 16px 14px 20px;
    background: var(--pa-support-navy);
    color: #fff;
}

.proaths-support__title {
    min-width: 0;
    margin: 0;
    font-size: 20px;
    line-height: 1.3;
    font-weight: 700;
}

.proaths-support__close {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .28) !important;
    border-radius: 50% !important;
    background: rgba(255, 255, 255, .10) !important;
    color: #fff !important;
    font: inherit;
    font-size: 26px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transform: none !important;
    transition: background-color 140ms ease, border-color 140ms ease !important;
}

.proaths-support__close:hover,
.proaths-support__close:focus-visible {
    background: rgba(255, 255, 255, .18) !important;
    border-color: rgba(255, 255, 255, .45) !important;
    color: #fff !important;
    transform: none !important;
}

.proaths-support__body {
    max-height: calc(min(640px, 100vh - 240px) - 64px);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    padding: 16px;
    font-size: 16px;
}

.proaths-support__intro {
    margin: 0 0 12px;
    color: #5b6472;
    font-size: 16px;
    line-height: 1.5;
}

.proaths-support__items {
    border: 1px solid var(--pa-support-border);
    border-radius: 14px;
    overflow: hidden;
}

.proaths-support__item + .proaths-support__item {
    border-top: 1px solid var(--pa-support-border);
}

.proaths-support__question {
    position: relative;
    width: 100%;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 14px;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #111 !important;
    font: inherit;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.4;
    text-align: left;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transform: none !important;
    transition: background-color 140ms ease, color 140ms ease !important;
}

.proaths-support__question > span:first-child {
    flex: 1 1 auto;
    min-width: 0;
    display: block;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
}

.proaths-support__question:hover,
.proaths-support__question:focus-visible,
.proaths-support__question[aria-expanded="true"] {
    background: #f5f7fb !important;
    color: var(--pa-support-navy) !important;
    transform: none !important;
}

.proaths-support__chevron {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 220ms cubic-bezier(.22, .61, .36, 1);
}

.proaths-support__question[aria-expanded="true"] .proaths-support__chevron {
    transform: rotate(225deg);
}

.proaths-support__answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 14px;
    background: #f5f7fb;
    color: #4d5664;
    font-size: 16px;
    line-height: 1.55;
    opacity: 0;
    will-change: max-height, opacity, padding-bottom;
    transition:
        max-height 240ms cubic-bezier(.22, .61, .36, 1),
        opacity 170ms ease,
        padding-bottom 240ms cubic-bezier(.22, .61, .36, 1);
}

.proaths-support__answer.is-open {
    padding-bottom: 14px;
    opacity: 1;
}

.proaths-support__steps {
    margin: 0;
    padding: 0 0 0 21px;
    font-size: 16px;
}

.proaths-support__steps li + li {
    margin-top: 6px;
}

.proaths-support__note {
    margin: 10px 0 0;
    color: #687282;
    font-size: 16px;
    line-height: 1.5;
}

.proaths-support__link {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 9px;
    color: var(--pa-support-navy);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.proaths-support__link:hover,
.proaths-support__link:focus-visible {
    color: #163a82;
    text-decoration-thickness: 2px;
}

.proaths-support__all {
    width: 100%;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 12px 0 0;
    padding: 12px 14px;
    border: 1px solid var(--pa-support-border);
    border-radius: 12px;
    background: #fff;
    color: var(--pa-support-navy);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    transform: none !important;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease !important;
}

.proaths-support__all:hover,
.proaths-support__all:focus-visible {
    border-color: #cbd3df;
    background: #f5f7fb;
    color: #163a82;
    transform: none !important;
}

/* ---------- Bottom Zalo direction CTA ---------- */
.proaths-support__contact {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin: 12px 0 0;
    padding: 14px;
    border: 1px solid var(--pa-support-navy) !important;
    border-radius: 12px !important;
    background: var(--pa-support-navy) !important;
    color: #fff !important;
    font: inherit;
    font-size: 16px;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transform: none !important;
    transition: background-color 140ms ease, border-color 140ms ease !important;
}

.proaths-support__contact:hover,
.proaths-support__contact:focus-visible {
    background: #163a82 !important;
    border-color: #163a82 !important;
    color: #fff !important;
    transform: none !important;
}

.proaths-support__contact-kicker {
    width: 100%;
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    opacity: .84;
    white-space: normal;
    overflow-wrap: break-word;
}

.proaths-support__contact-main {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 16px;
    line-height: 1.4;
}

.proaths-support__contact-main strong {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
}

.proaths-support__contact-arrow {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.35);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    transform: none !important;
}

/* ---------- Cart drawer avoidance ----------
 * JS updates --pa-cart-shift to the *visible* width of the right-side cart
 * drawer on every animation frame while that drawer is moving. No CSS right
 * transition is used here: the support stack follows the cart's real position
 * instead of trying to guess its duration/easing.
 */

/* ---------- Native Zalo geometry ----------
 * Zalo's SDK creates a 70x70 collapsed fixed widget and later expands the
 * same cross-origin widget into the chat panel. We can lock the OUTER anchor
 * so ProAths does not add any positional movement. The native icon that Zalo
 * draws inside its expanded cross-origin iframe is controlled by Zalo itself;
 * CSS on proaths.com cannot reposition that internal element independently.
 */
body .zalo-chat-widget {
    position: fixed !important;
    right: calc(var(--pa-zalo-right) + var(--pa-cart-shift)) !important;
    bottom: var(--pa-zalo-bottom) !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    transform: none !important;
    transition: none !important;
}

body .zalo-chat-widget > iframe {
    right: 0 !important;
    bottom: 0 !important;
    left: auto !important;
    top: auto !important;
    margin: 0 !important;
    transform: none !important;
    transition: none !important;
}


@media (prefers-reduced-motion: reduce) {
    .proaths-support__answer,
    .proaths-support__chevron {
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 575px) {
    :root {
        --pa-stack-right: 16px;
        --pa-support-bottom: 76px;
        --pa-zalo-right: 5px;
        --pa-zalo-bottom: 136px;
    }

    .proaths-support__panel {
        right: calc(12px + var(--pa-cart-shift));
        bottom: calc(var(--pa-zalo-bottom) + var(--pa-zalo-native-size) + 10px);
        width: min(var(--pa-support-panel-width), 90vw);
        max-height: calc(100vh - 232px);
        border-radius: 18px;
    }

    .proaths-support__body {
        max-height: calc(100vh - 296px);
    }

    .proaths-support__launcher-tooltip {
        right: calc(var(--pa-stack-right) + var(--pa-cart-shift) + var(--pa-support-size) + 8px);
        bottom: calc(var(--pa-support-bottom) + 4px);
        max-width: calc(100vw - 90px);
    }

    .proaths-support__zalo-tooltip {
        right: calc(var(--pa-zalo-right) + var(--pa-cart-shift) + var(--pa-zalo-native-size) + 6px);
        bottom: calc(var(--pa-zalo-bottom) + 15px);
        max-width: calc(100vw - 100px);
    }
}
