/* Client support hub — modal picker (sitewide, Limart-style full-page frost blur) */

/* Mount layer must sit above page content (site-premium sets direct children to z-index: 1) */
.support-hub-root {
    position: fixed;
    inset: 0;
    z-index: 10040;
    pointer-events: none;
}

/* Lock scroll while a hub modal is open */
html.support-hub-open,
html.team-link-open,
body.support-hub-open,
body.team-link-open {
    overflow: hidden;
}

/* Blur page content behind the overlay (reliable across browsers / stacking contexts) */
body.support-hub-open .site-main,
body.support-hub-open main.site-main,
body.support-hub-open main:not(header),
body.team-link-open .site-main,
body.team-link-open main.site-main,
body.team-link-open main:not(header) {
    filter: blur(10px) saturate(115%);
    pointer-events: none;
    user-select: none;
}

body.support-hub-open footer.site-footer,
body.team-link-open footer.site-footer,
body.support-hub-open header#header,
body.support-hub-open header.site-header,
body.team-link-open header#header,
body.team-link-open header.site-header,
body.support-hub-open .floating-buttons,
body.team-link-open .floating-buttons,
body.support-hub-open .user-menu,
body.team-link-open .user-menu {
    filter: blur(10px) saturate(115%);
    pointer-events: none;
    user-select: none;
}

.support-hub {
    position: fixed;
    inset: 0;
    z-index: 10040;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.65rem, 2vh, 1.25rem);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(28px) saturate(160%) brightness(1.06);
    -webkit-backdrop-filter: blur(28px) saturate(160%) brightness(1.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.22s ease, visibility 0.22s ease, backdrop-filter 0.22s ease;
}

/* Full-viewport frost when open — matches Limart reference */
body.support-hub-open .support-hub.is-open,
body.support-hub-open:has(header#header) .support-hub.is-open,
body.support-hub-open:has(header.site-header) .support-hub.is-open {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(32px) saturate(165%) brightness(1.06);
    -webkit-backdrop-filter: blur(32px) saturate(165%) brightness(1.06);
}

body.team-link-open .team-link-modal.is-open,
body.team-link-open:has(header#header) .team-link-modal.is-open,
body.team-link-open:has(header.site-header) .team-link-modal.is-open {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(32px) saturate(165%) brightness(1.06);
    -webkit-backdrop-filter: blur(32px) saturate(165%) brightness(1.06);
}

/* Overlay and dialogs sit above all blurred page UI */
body.support-hub-open .support-hub-root,
body.team-link-open .support-hub-root,
body.support-hub-open .support-hub,
body.team-link-open .team-link-modal {
    z-index: 10080 !important;
}

.support-hub.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

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

.support-hub__dialog {
    width: min(100%, 920px);
    max-height: calc(100dvh - 5rem);
    overflow: hidden;
    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);
}
.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);
}
.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);
}
.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(255, 255, 255, 0.72);
    backdrop-filter: blur(28px) saturate(160%) brightness(1.06);
    -webkit-backdrop-filter: blur(28px) saturate(160%) brightness(1.06);
    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; }
@media (max-width: 700px) {
    .support-hub {
        padding: 0.4rem;
    }
    .support-hub__dialog {
        width: min(100%, 420px);
        max-height: calc(100dvh - 0.8rem);
        border-radius: 18px;
    }
    .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;
    }
    .support-hub__brand {
        margin-bottom: 0.22rem;
        font-size: 0.9rem;
    }
    .support-hub__top h2 {
        margin-bottom: 0.22rem;
        font-size: clamp(1rem, 5.2vw, 1.28rem);
        line-height: 1.18;
    }
    .support-hub__top p {
        font-size: 0.72rem;
        line-height: 1.35;
        max-width: 18rem;
    }
    .support-hub__body {
        padding: 0.55rem 0.65rem;
    }
    .support-hub__agents {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }
    .support-hub__agent {
        flex-direction: row;
        text-align: left;
        align-items: flex-start;
        gap: 0.65rem;
        padding: 0.72rem 0.78rem;
        border-radius: 14px;
    }
    .support-hub__agent-icon {
        width: 2.2rem;
        height: 2.2rem;
        font-size: 1rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    .support-hub__agent-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
    .support-hub__agent h3 {
        margin-bottom: 0.18rem;
        font-size: 0.84rem;
        line-height: 1.25;
    }
    .support-hub__agent p {
        margin-bottom: 0.52rem;
        font-size: 0.72rem;
        line-height: 1.33;
    }
    .support-hub__btn {
        width: auto;
        align-self: flex-start;
        padding: 0.42rem 0.68rem;
        font-size: 0.74rem;
        line-height: 1.2;
    }
    .support-hub__foot {
        padding: 0.45rem 0.7rem 0.55rem;
    }
    .support-hub__nav {
        gap: 0.22rem 0.55rem;
    }
    .support-hub__nav a,
    .support-hub__nav span {
        font-size: 0.74rem;
        line-height: 1.2;
    }

    .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;
    }
}
