/* Lock scroll while support / team modals are open */
html.support-hub-open,
html.team-link-open,
html.ai-chat-open,
body.support-hub-open,
body.team-link-open {
    overflow: hidden;
}

/* Full-page frost — everything behind except hub dialog + chat FAB */
body.support-hub-open .support-hub.is-open,
body.team-link-open .team-link-modal.is-open {
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(32px) saturate(165%) brightness(1.04);
    -webkit-backdrop-filter: blur(32px) saturate(165%) brightness(1.04);
}

/* Blur all page chrome (nav, promo, menu, content, footer) */
body.support-hub-open .promo-strip,
body.support-hub-open .navbar,
body.support-hub-open .navbar .nav-links,
body.support-hub-open #site-content,
body.support-hub-open .footer-main,
body.support-hub-open header.page-header,
body.support-hub-open .site-energy-bg,
body.team-link-open .promo-strip,
body.team-link-open .navbar,
body.team-link-open .navbar .nav-links,
body.team-link-open #site-content,
body.team-link-open .footer-main,
body.team-link-open header.page-header,
body.team-link-open .site-energy-bg {
    filter: blur(14px) saturate(110%);
    pointer-events: none;
    user-select: none;
}

/* Chat FAB stays sharp and clickable above the frost */
body.support-hub-open .floating-buttons,
body.team-link-open .floating-buttons {
    filter: none !important;
    -webkit-filter: none !important;
    pointer-events: none;
    z-index: 100000 !important;
}

body.support-hub-open .floating-buttons .floating-btn,
body.support-hub-open .floating-buttons .floating-chat-wrap,
body.team-link-open .floating-buttons .floating-btn,
body.team-link-open .floating-buttons .floating-chat-wrap {
    pointer-events: auto !important;
}

@media (prefers-reduced-motion: reduce) {
    body.support-hub-open .promo-strip,
    body.support-hub-open .navbar,
    body.support-hub-open #site-content,
    body.support-hub-open .footer-main,
    body.team-link-open .promo-strip,
    body.team-link-open .navbar,
    body.team-link-open #site-content,
    body.team-link-open .footer-main {
        filter: none;
    }
}

.support-hub {
    position: fixed;
    inset: 0;
    z-index: 10080;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.65rem, 2vh, 1.25rem);
    background: rgba(232, 237, 245, 0.4);
    backdrop-filter: blur(14px) saturate(120%);
    -webkit-backdrop-filter: blur(14px) saturate(120%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease;
}
.support-hub.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.support-hub__dialog {
    width: min(100%, 920px);
    max-height: calc(100dvh - 5rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: linear-gradient(165deg, #eff6ff 0%, #dbeafe 52%, #e0f2fe 100%);
    border-radius: 20px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    box-shadow:
        0 28px 70px rgba(37, 99, 235, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.65) inset,
        0 8px 32px rgba(15, 23, 42, 0.08);
    transform: translateY(10px) scale(0.98);
    transition: transform 0.22s ease;
    position: relative;
}
.support-hub.is-open .support-hub__dialog {
    transform: translateY(0) scale(1);
}
.support-hub__close {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: background 0.15s ease, color 0.15s ease;
    z-index: 2;
}
.support-hub__close:hover {
    background: rgba(37, 99, 235, 0.12);
    color: #2563eb;
}
.support-hub__top {
    padding: clamp(1rem, 2.5vh, 1.25rem) clamp(2.5rem, 4vw, 2.75rem) clamp(0.85rem, 2vh, 1rem);
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
    flex-shrink: 0;
}
.support-hub__top::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 90% at 50% 0%, rgba(59, 130, 246, 0.18), transparent 72%);
    pointer-events: none;
    z-index: 0;
}
.support-hub__top > * { position: relative; z-index: 1; }
.support-hub__brand {
    margin: 0 0 0.4rem;
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    font-size: clamp(1rem, 2.2vw, 1.15rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #2563eb;
}
.support-hub__brand span {
    font-weight: 600;
    font-size: 0.84em;
    color: #475569;
}
.support-hub__top h2 {
    margin: 0 0 0.35rem;
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    font-size: clamp(1.12rem, 2.8vw, 1.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.support-hub__top p {
    margin: 0 auto;
    max-width: 34rem;
    font-size: clamp(0.8rem, 1.8vw, 0.9rem);
    line-height: 1.5;
    color: #475569;
}
.support-hub__body {
    padding: clamp(0.9rem, 2vh, 1.1rem) clamp(0.9rem, 2.5vw, 1.15rem);
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}
.support-hub__agents {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}
.support-hub__agent {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(0.85rem, 2vh, 1rem) 0.7rem;
    border: 1px solid rgba(59, 130, 246, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.support-hub__agent--team { cursor: pointer; }
.support-hub__agent:hover {
    border-color: rgba(37, 99, 235, 0.32);
    box-shadow: 0 10px 28px rgba(37, 99, 235, 0.1);
    transform: translateY(-2px);
}
.support-hub__agent-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #fff;
    margin-bottom: 0.55rem;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}
.support-hub__agent-icon--ai { background: linear-gradient(145deg, #6366f1, #4f46e5); }
.support-hub__agent-icon--team { background: linear-gradient(145deg, #2563eb, #1d4ed8); }
.support-hub__agent-icon--wa { background: linear-gradient(145deg, #22c55e, #16a34a); }
.support-hub__agent h3 {
    margin: 0 0 0.35rem;
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    font-size: clamp(0.82rem, 1.8vw, 0.92rem);
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}
.support-hub__agent p {
    margin: 0 0 0.7rem;
    font-size: clamp(0.74rem, 1.6vw, 0.8rem);
    line-height: 1.45;
    color: #64748b;
    flex: 1;
}
.support-hub__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    padding: 0.48rem 0.55rem;
    border-radius: 10px;
    font-size: clamp(0.74rem, 1.6vw, 0.8rem);
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: transform 0.15s ease, filter 0.15s ease;
}
.support-hub__btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.support-hub__btn--ai { background: #4f46e5; color: #fff; }
.support-hub__btn--team { background: #2563eb; color: #fff; }
.support-hub__btn--wa { background: #16a34a; color: #fff; }
.support-hub__foot {
    padding: 0.75rem 1rem 0.9rem;
    text-align: center;
    border-top: 1px solid rgba(59, 130, 246, 0.14);
    background: rgba(255, 255, 255, 0.35);
    flex-shrink: 0;
}
.support-hub__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem 0.7rem;
    justify-content: center;
    margin: 0;
}
.support-hub__nav a {
    font-size: 0.8rem;
    color: #475569;
    text-decoration: none;
}
.support-hub__nav a:hover { color: #2563eb; text-decoration: underline; }
.team-link-modal {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: 0;
    z-index: 10060;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.35);
    backdrop-filter: blur(12px) saturate(120%);
    -webkit-backdrop-filter: blur(12px) saturate(120%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}
.team-link-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.team-link-modal__dialog {
    width: min(100%, 440px);
    background: linear-gradient(165deg, #eff6ff 0%, #dbeafe 52%, #e0f2fe 100%);
    border-radius: 18px;
    border: 1px solid rgba(59, 130, 246, 0.22);
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.16), 0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    overflow: hidden;
    transform: translateY(8px) scale(0.98);
    transition: transform 0.2s ease;
}
.team-link-modal.is-open .team-link-modal__dialog {
    transform: translateY(0) scale(1);
}
.team-link-modal__head {
    padding: clamp(1rem, 2.5vh, 1.15rem) clamp(1rem, 3vw, 1.25rem) clamp(0.85rem, 2vh, 1rem);
    text-align: center;
    position: relative;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
    background: transparent;
    color: #0f172a;
}
.team-link-modal__head::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 90% at 50% 0%, rgba(59, 130, 246, 0.18), transparent 72%);
    pointer-events: none;
    z-index: 0;
}
.team-link-modal__head > * {
    position: relative;
    z-index: 1;
}
.team-link-modal__head h2 {
    margin: 0 0 0.35rem;
    font-family: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
    font-size: clamp(1.05rem, 2.5vw, 1.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}
.team-link-modal__head p {
    margin: 0 auto;
    max-width: 22rem;
    font-size: clamp(0.8rem, 1.8vw, 0.88rem);
    line-height: 1.5;
    color: #475569;
    opacity: 1;
}
.team-link-modal__body {
    padding: 1rem 1.15rem 1.15rem;
    background: #fff;
}
.team-link-modal__label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #0f172a;
}
.team-link-modal__input {
    width: 100%;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font: inherit;
    font-size: 0.84rem;
    color: #0f172a;
}
.team-link-modal__input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.team-link-modal__error {
    margin: 0.5rem 0 0;
    font-size: 0.78rem;
    color: #dc2626;
    display: none;
}
.team-link-modal__error.is-visible { display: block; }
.team-link-modal__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.team-link-modal__btn {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border-radius: 10px;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
}
.team-link-modal__btn--ghost { background: #f1f5f9; color: #0f172a; }
.team-link-modal__btn--primary { background: #2563eb; color: #fff; }
.team-link-modal__btn--ghost { background: #f1f5f9; color: #0f172a; }
.team-link-modal__btn--primary { background: #2563eb; color: #fff; }

/* Mobile — match Liyanawap reference: stacked cards, tight height, no scroll */
@media (max-width: 700px) {
    .support-hub {
        padding: 0.4rem 0.45rem !important;
        align-items: center !important;
        justify-content: center !important;
        inset: 0 !important;
        top: 0 !important;
    }

    .support-hub__dialog {
        width: min(100%, 420px) !important;
        max-height: calc(100dvh - 0.8rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
        border-radius: 18px !important;
        overflow: hidden !important;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .support-hub__dialog::-webkit-scrollbar {
        display: none;
        width: 0;
        height: 0;
    }

    .support-hub__close {
        top: 0.55rem;
        right: 0.55rem;
        width: 1.8rem;
        height: 1.8rem;
        font-size: 0.92rem;
    }

    .support-hub__top {
        padding: 0.7rem 2.15rem 0.55rem 0.95rem !important;
    }

    .support-hub__brand {
        margin-bottom: 0.22rem !important;
        font-size: 0.9rem !important;
        line-height: 1.25;
    }

    .support-hub__brand span {
        font-size: 0.84em;
    }

    .support-hub__top h2 {
        margin-bottom: 0.22rem !important;
        font-size: clamp(1rem, 5.2vw, 1.28rem) !important;
        line-height: 1.18 !important;
    }

    .support-hub__top p {
        font-size: 0.72rem !important;
        line-height: 1.35 !important;
        max-width: 18rem;
        margin-left: auto;
        margin-right: auto;
    }

    .support-hub__body {
        padding: 0.55rem 0.65rem !important;
    }

    .support-hub__agents {
        grid-template-columns: 1fr !important;
        gap: 0.55rem !important;
    }

    .support-hub__agent {
        flex-direction: row !important;
        text-align: left !important;
        align-items: flex-start !important;
        gap: 0.65rem !important;
        padding: 0.72rem 0.78rem !important;
        border-radius: 14px !important;
    }

    .support-hub__agent:hover {
        transform: none;
    }

    .support-hub__agent-icon {
        width: 2.2rem !important;
        height: 2.2rem !important;
        font-size: 1rem !important;
        margin-bottom: 0 !important;
        flex-shrink: 0;
        border-radius: 12px !important;
    }

    .support-hub__agent-body {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
    }

    .support-hub__agent h3 {
        margin-bottom: 0.18rem !important;
        font-size: 0.84rem !important;
        line-height: 1.25 !important;
    }

    .support-hub__agent p {
        margin-bottom: 0.52rem !important;
        font-size: 0.72rem !important;
        line-height: 1.33 !important;
        display: block;
        -webkit-line-clamp: unset;
        overflow: visible;
    }

    .support-hub__btn {
        width: auto !important;
        align-self: flex-start !important;
        padding: 0.42rem 0.68rem !important;
        font-size: 0.74rem !important;
        line-height: 1.2 !important;
        border-radius: 999px !important;
    }

    .support-hub__foot {
        padding: 0.45rem 0.7rem 0.55rem !important;
    }

    .support-hub__nav {
        gap: 0.22rem 0.55rem !important;
    }

    .support-hub__nav a,
    .support-hub__nav span {
        font-size: 0.74rem !important;
        line-height: 1.2 !important;
    }

    .team-link-modal {
        padding: 0.7rem;
    }

    .team-link-modal__dialog {
        border-radius: 16px;
    }

    .team-link-modal__head {
        padding: 0.85rem 0.95rem 0.7rem;
    }

    .team-link-modal__body {
        padding: 0.85rem 0.95rem 0.95rem;
    }
}

/* Very small phones — slight extra tightening only when needed */
@media (max-width: 380px) {
    .support-hub {
        padding: 0.3rem 0.35rem !important;
    }

    .support-hub__top {
        padding: 0.58rem 2rem 0.48rem 0.82rem !important;
    }

    .support-hub__top h2 {
        font-size: 0.95rem !important;
    }

    .support-hub__top p {
        font-size: 0.68rem !important;
    }

    .support-hub__body {
        padding: 0.45rem 0.55rem !important;
    }

    .support-hub__agents {
        gap: 0.45rem !important;
    }

    .support-hub__agent {
        padding: 0.62rem 0.68rem !important;
        gap: 0.55rem !important;
    }

    .support-hub__agent-icon {
        width: 2rem !important;
        height: 2rem !important;
        font-size: 0.92rem !important;
    }

    .support-hub__agent h3 {
        font-size: 0.8rem !important;
    }

    .support-hub__agent p {
        font-size: 0.68rem !important;
        margin-bottom: 0.42rem !important;
    }

    .support-hub__btn {
        padding: 0.36rem 0.58rem !important;
        font-size: 0.7rem !important;
    }

    .support-hub__foot {
        padding: 0.38rem 0.55rem 0.48rem !important;
    }
}
