/* NexBlazers — shared component styles (used by every page). */

.glass-card {
    /* Solid surface card (name kept for compatibility; no glass effect) */
    background: #FFFFFF;
    border: 1px solid #E8E8EA;
    box-shadow: 0 1px 2px rgba(10, 10, 10, 0.03);
}
.glass-card-hover {
    transition: border-color 0.18s ease, background-color 0.18s ease;
}
.glass-card-hover:hover {
    background: #FFFFFF;
    border-color: #C4C4CA !important;
}
.text-gradient {
    background: none;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.gradient-border {
    position: relative;
    background: #E8E8EA;
    border-radius: 12px;
    padding: 1px;
}
.gradient-border-inner {
    background: #FFFFFF;
    border-radius: 11px;
}

/* Header: keep in-page anchor targets clear of the sticky 80px header */
section[id] { scroll-margin-top: 6rem; }

/* Header: active desktop nav item is shown as a filled pill (classes in scripts/build.mjs) */
.nav-link { position: relative; }

/* Chat launcher (site.js section 3): the single chat button on every page.
   Same gradient, radius and navy text as the "Book Consultation" CTA.
   z-index 45: above the sticky header (40), below the mobile menu (50)
   and the NexLabs details window (60), so it never covers them. */
.nb-chat-launcher {
    --nb-chat-size: 3.5rem;
    --nb-chat-gap: 1.25rem;
    position: fixed;
    right: max(var(--nb-chat-gap), env(safe-area-inset-right, 0px));
    bottom: max(var(--nb-chat-gap), calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
    z-index: 45;
    width: var(--nb-chat-size);
    height: var(--nb-chat-size);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 9999px;
    color: #FFFFFF;
    background: #0A0A0A;
    box-shadow: 0 8px 20px -8px rgba(10, 10, 10, 0.35);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transition: background-color 0.15s ease, transform 0.15s ease, opacity 0.2s ease, visibility 0.2s;
}
.nb-chat-launcher:hover {
    background: #27272A;
}
.nb-chat-launcher:active { transform: translateY(0) scale(0.96); }
.nb-chat-launcher:focus-visible { outline: 2px solid #2563EB; outline-offset: 3px; }
.nb-chat-launcher.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; transform: scale(0.85); }

.nb-chat-icon { width: 1.375rem; height: 1.375rem; display: block; }
.nb-chat-spinner {
    display: none;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 9999px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-top-color: #FFFFFF;
    animation: nbChatSpin 0.8s linear infinite;
}
.nb-chat-launcher[data-status="loading"] { cursor: progress; }
.nb-chat-launcher[data-status="loading"] .nb-chat-icon { display: none; }
.nb-chat-launcher[data-status="loading"] .nb-chat-spinner { display: block; }
@keyframes nbChatSpin { to { transform: rotate(360deg); } }

/* Dot = a minimized conversation is waiting; purple + pulse = new message */
.nb-chat-dot {
    display: none;
    position: absolute;
    top: -0.3rem;
    right: -0.3rem;
    width: 0.85rem;
    height: 0.85rem;
    border-radius: 9999px;
    background: #2563EB;
    border: 2px solid #FFFFFF;
}
.nb-chat-launcher.has-conversation .nb-chat-dot { display: block; }
.nb-chat-launcher.has-unread .nb-chat-dot { background: #2563EB; animation: nbChatPulse 1.6s ease-in-out infinite; }
@keyframes nbChatPulse { 50% { transform: scale(1.25); } }

/* Label: tooltip on hover/keyboard focus, always shown while connecting or on error */
.nb-chat-label {
    position: absolute;
    right: calc(100% + 0.75rem);
    top: 50%;
    transform: translate(0.25rem, -50%);
    padding: 0.45rem 0.75rem;
    border-radius: 6px;
    background: #0A0A0A;
    border: 1px solid #0A0A0A;
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 20px -8px rgba(10, 10, 10, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.nb-chat-launcher:focus-visible .nb-chat-label,
.nb-chat-launcher[data-status="loading"] .nb-chat-label,
.nb-chat-launcher[data-status="error"] .nb-chat-label { opacity: 1; transform: translate(0, -50%); }
@media (hover: hover) and (pointer: fine) {
    .nb-chat-launcher:hover .nb-chat-label { opacity: 1; transform: translate(0, -50%); }
}

@media (max-width: 640px) {
    .nb-chat-launcher { --nb-chat-size: 3.25rem; --nb-chat-gap: 1rem; }
}
/* Phones and tablets: keep the last footer line clear of the launcher */
@media (max-width: 1023px) {
    body.nb-chat footer { padding-bottom: 6rem; }
}
@media (prefers-reduced-motion: reduce) {
    .nb-chat-launcher, .nb-chat-label { transition: none; }
    .nb-chat-spinner { animation-duration: 1.6s; }
    .nb-chat-launcher.has-unread .nb-chat-dot { animation: none; }
}

/* Salesforce's own launcher and minimized bubble stay hidden while ours is in
   charge, so there is never a second chat icon. (site.js drops the
   nb-chat-managed class only if Salesforce has to take over.) */
body.nb-chat-managed #embeddedMessagingConversationButton,
body.nb-chat-managed .embeddedMessagingConversationButtonWrapper { display: none !important; }
body.nb-chat-managed #embeddedMessagingFrame.isMinimized,
body.nb-chat-managed .embeddedMessagingFrame.isMinimized { visibility: hidden !important; pointer-events: none !important; }

/* Contact card on articles (site.js section 4).
   Bottom-left, so it never overlaps the chat button on the right; on phones it
   is narrowed to leave room for that button. z-index 44: under the chat
   launcher (45) and the mobile menu (50). */
.nb-contact-card {
    position: fixed;
    left: max(1.25rem, env(safe-area-inset-left, 0px));
    bottom: max(1.25rem, calc(env(safe-area-inset-bottom, 0px) + 0.75rem));
    z-index: 44;
    width: min(20rem, calc(100vw - 2.5rem - 3.5rem - 0.75rem));
    padding: 1rem 1.125rem 1.125rem;
    border-radius: 12px;
    overflow: hidden;
    background: #FFFFFF;
    border: 1px solid #E8E8EA;
    box-shadow: 0 16px 40px -16px rgba(10, 10, 10, 0.18);
    color: #52525B;
    font-size: 0.8125rem;
    line-height: 1.45;
    opacity: 0;
    visibility: hidden;
    transform: translateY(0.75rem);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s;
}
.nb-contact-card.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}
.nb-contact-card__eyebrow {
    margin: 0 0 0.125rem;
    font-size: 0.625rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-weight: 500;
    color: #71717A;
}
.nb-contact-card__title { margin: 0 1.75rem 0.25rem 0; font-size: 0.9375rem; font-weight: 600; color: #0A0A0A; letter-spacing: -0.01em; line-height: 1.3; }
.nb-contact-card__text { margin: 0 0 0.875rem; }
.nb-contact-card__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.nb-contact-card__primary,
.nb-contact-card__secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.375rem;
    padding: 0 0.875rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.nb-contact-card__primary { color: #FFFFFF; background: #0A0A0A; border: 0; }
.nb-contact-card__primary:hover { background: #27272A; }
.nb-contact-card__secondary { color: #27272A; background: #FFFFFF; border: 1px solid #DCDCE0; font-family: inherit; }
.nb-contact-card__secondary:hover { border-color: #C4C4CA; background: #FAFAFA; color: #0A0A0A; }
.nb-contact-card__close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: #A1A1AA;
    cursor: pointer;
}
.nb-contact-card__close:hover { background: #F4F4F5; color: #0A0A0A; }
.nb-contact-card :focus-visible { outline: 2px solid #2563EB; outline-offset: 2px; }
@media (max-width: 640px) {
    /* phones: smaller card, chat button here is 3.25rem with a 1rem gap */
    .nb-contact-card {
        left: max(1rem, env(safe-area-inset-left, 0px));
        width: min(18rem, calc(100vw - 2rem - 3.25rem - 0.75rem));
        padding: 0.875rem 0.875rem 0.875rem 1rem;
        font-size: 0.75rem;
    }
    .nb-contact-card__title { font-size: 0.875rem; }
    .nb-contact-card__text { margin-bottom: 0.75rem; }
    .nb-contact-card__primary, .nb-contact-card__secondary { min-height: 2.25rem; padding: 0 0.75rem; font-size: 0.6875rem; }
}
@media (prefers-reduced-motion: reduce) {
    .nb-contact-card { transform: none; transition: opacity 0.2s linear, visibility 0.2s; }
    .nb-contact-card.is-visible { animation: none; }
}
@media print { .nb-contact-card { display: none; } }
