/* =========================================
   base.css (CLEAN)
   Single source of truth for:
   - global background (Home v2)
   - pinned nav
   - layout shell spacing
   - shared UI primitives
   ========================================= */

* { box-sizing: border-box; }

:root{
  --color-bg: #050608;
  --color-surface: #111217;
  --color-border: #262833;
  --color-text: #f5f5f5;
  --color-text-muted: #9ea2b8;
  --color-accent: #cfd9c6;
  --color-accent-soft: #d6e0cd;
  --color-focus: rgba(207,217,198,0.55);

  --radius-card: 18px;
  --radius-pill: 999px;

  --shadow-card: 0 14px 34px rgba(0,0,0,0.55);
  --shadow-card-hover: 0 18px 44px rgba(0,0,0,0.70);

  /* Shared aliases used throughout the existing UI */
  --accent: var(--color-accent);
  --accent-strong: #b8c8aa;
  --text: var(--color-text);
  --muted: var(--color-text-muted);
  --nav-h: 80px;
  --nav-top-gap: 12px;
  --bg-dark: var(--color-bg);
  --border: var(--color-border);
  --border-strong: rgba(255,255,255,0.14);
}

/* Global canvas */
html, body{
  margin: 0;
  padding: 0;
  height: auto;
  overflow-y: auto;
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 0 0, #222738 0, transparent 55%),
    radial-gradient(circle at 100% 100%, #181b24 0, transparent 55%),
    radial-gradient(circle at 0 100%, #151923 0, transparent 55%),
    var(--bg-dark);
}

/* stop images exploding layout */
img{ max-width: 100%; height: auto; display: block; }

/* =========================
   NAV (pinned) – modern, cohesive with site
   ========================= */

.il-nav{
  position: fixed;
  top: var(--nav-top-gap);
  left: 0;
  right: 0;
  z-index: 9999;
  background: transparent;
  box-shadow: none;
  border: 0;
  padding: 0 14px;
  transition: transform 0.22s ease, opacity 0.22s ease;
  will-change: transform;
}

.il-nav, .il-nav-inner{ overflow: visible; }

.mobile-logo-bar{
  display: none;
}

body.nav-hidden .il-nav{
  transform: translateY(calc(-100% - var(--nav-top-gap) - 6px));
  opacity: 0;
}

.il-nav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 1480px;
  margin: 0 auto;
  padding: 0 1.1rem;
  height: var(--nav-h);
  border-radius: 22px;
  background: rgba(17, 18, 23, 0.78);
  border: 1px solid rgba(38, 40, 51, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.32);
}

/* Brand – compact */
.header-logo{
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.header-logo-mark{
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: rgba(255,255,255,0.95);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  transition: opacity 0.2s ease;
}

.header-logo-mark:hover{ opacity: 0.9; }

.header-logo-img{
  height: 76px;
  width: auto;
}

/* Centre nav – compact pill-style links */
.header-nav{
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.header-nav a,
.header-nav summary{
  color: rgba(255,255,255,0.66);
  text-decoration: none;
  font-size: 0.81rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  padding: 0.34rem 0.62rem;
  height: 38px;
  display: inline-flex;
  align-items: center;
  position: relative;
  border-radius: 999px;
  transition: color 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.header-nav a:hover,
.header-nav summary:hover{
  color: rgba(255,255,255,0.92);
  background: rgba(255,255,255,0.04);
}

.header-nav a::after,
.header-nav summary::after{
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.18s ease, background 0.18s ease;
}

.header-nav a:hover::after,
.header-nav summary:hover::after{
  transform: scaleX(1);
  background: rgba(255,255,255,0.22);
}

.header-nav a.active,
.header-nav summary.active,
.header-nav .nav-group[open] > summary{
  color: rgba(255,255,255,0.96);
  background: rgba(255,255,255,0.05);
}

.header-nav a.active::after,
.header-nav summary.active::after,
.header-nav .nav-group[open] > summary::after{
  transform: scaleX(1);
  background: var(--accent);
}

.header-nav summary{
  list-style: none;
}

.header-nav summary::-webkit-details-marker{
  display: none;
}

.nav-group{
  position: relative;
}

.nav-group > summary{
  padding-right: 1.05rem;
}

.nav-group > summary::before{
  content: "";
  position: absolute;
  right: 2px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-right: 1.8px solid rgba(255,255,255,0.7);
  border-bottom: 1.8px solid rgba(255,255,255,0.7);
  transform: translateY(-65%) rotate(45deg);
  transition: transform 0.16s ease, border-color 0.16s ease;
}

.nav-group[open] > summary::before{
  transform: translateY(-25%) rotate(225deg);
  border-color: var(--accent);
}

.nav-submenu{
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 184px;
  padding: 0.5rem;
  border-radius: 16px;
  background: rgba(17, 18, 23, 0.98);
  border: 1px solid rgba(38, 40, 51, 0.96);
  box-shadow: 0 18px 38px rgba(0,0,0,0.52);
  z-index: 10000;
}

.nav-group[open] .nav-submenu{
  display: grid;
  gap: 0.2rem;
}

.nav-submenu a{
  height: auto;
  padding: 0.68rem 0.78rem;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255,255,255,0.84);
}

.nav-submenu a::after{
  display: none;
}

.nav-submenu a:hover{
  background: rgba(207,217,198,0.10);
  color: rgba(255,255,255,0.98);
}

.nav-submenu a.active{
  background: rgba(207,217,198,0.14);
  color: rgba(255,255,255,0.98);
}
.nav-toggle{
  display: none; /* shown below 960px */
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(38, 40, 51, 0.96);
  border-radius: 12px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.nav-toggle:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(207,217,198,0.22);
}

.nav-toggle-icon{
  width: 18px;
  height: 14px;
  display: inline-flex;
  flex-direction: column;
  justify-content: space-between;
}

.nav-toggle-icon span{
  display: block;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  opacity: 0.9;
}
.nav-scrim{
  display: none;
  position: fixed;
  top: var(--nav-h);
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9997;
  background: rgba(0,0,0,0.55);
}

.nav-scrim.open{ display: block; }

.nav-drawer{
  position: fixed;
  top: var(--nav-h);
  right: 0;
  bottom: 0;
  width: min(360px, 86vw);
  z-index: 9998;

  background: rgba(17, 18, 23, 0.98);
  backdrop-filter: blur(12px);
  border-left: 1px solid rgba(38, 40, 51, 0.96);
  box-shadow: -12px 0 40px rgba(0,0,0,0.55);

  padding: 1.25rem;
  overflow-y: auto;

  transform: translateX(105%);
  transition: transform 0.22s ease;
}

.nav-drawer.open{ transform: translateX(0); }

/* Right side */
.header-right{
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
}

.header-utility-pills{
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.signed-in-pill{
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(251, 191, 36, 0.34);
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(91, 33, 182, 0.24));
  color: #eff6ff;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.site-kind-pill{
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.site-kind-live{
  background: rgba(15, 23, 42, 0.78);
  border-color: rgba(255,255,255,0.18);
}

.site-kind-dev-test{
  background: rgba(30, 64, 175, 0.42);
  border-color: rgba(96, 165, 250, 0.4);
}

.site-kind-demo-training{
  background: rgba(91, 33, 182, 0.42);
  border-color: rgba(196, 181, 253, 0.36);
}

.site-kind-template{
  background: rgba(6, 95, 70, 0.34);
  border-color: rgba(52, 211, 153, 0.32);
}

.site-switcher{ position: relative; }

.site-btn,
.logout-btn{
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.9);
  border: 1px solid rgba(38, 40, 51, 0.96);
  border-radius: 999px;
  padding: 0.38rem 0.68rem;
  font-size: 0.77rem;
  font-weight: 600;
  line-height: 1;
  min-height: 34px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.28rem;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
  text-decoration: none;
}

.site-btn:hover,
.logout-btn:hover{
  background: rgba(255,255,255,0.08);
  border-color: rgba(207,217,198,0.22);
  color: rgba(255,255,255,0.98);
}

.site-btn .caret{ font-size: 0.65rem; opacity: 0.8; }

.site-menu{
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: rgba(17, 18, 23, 0.98);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(38, 40, 51, 0.96);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.5);
  min-width: 160px;
  overflow: hidden;
  z-index: 99999;
}

.site-menu.open{ display: block; }

.site-menu a{
  display: block;
  padding: 0.6rem 1rem;
  text-decoration: none;
  color: rgba(255,255,255,0.9);
  font-size: 0.85rem;
  font-weight: 600;
  transition: background 0.15s ease;
}

.site-menu a:hover{
  background: rgba(207,217,198,0.1);
}

/* Focus */
.header-nav a:focus-visible,
.header-nav summary:focus-visible,
.site-btn:focus-visible,
.logout-btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 2px rgba(207,217,198,0.35);
}


/* =========================
   PAGE SHELL
   IMPORTANT:
   - Must NOT be a scroll container
   - Must be pushed down under fixed nav
   ========================= */

.page-shell{
  max-width: 980px;
  margin: 0 auto;
  padding: calc(var(--nav-h) + var(--nav-top-gap) + 38px) 16px 28px;
  min-height: 100vh;
  background: transparent;
  overflow: visible;
  height: auto;
  transform: none;
}

@media (max-width: 760px){
  .page-shell{ padding: calc(var(--nav-h) + var(--nav-top-gap) + 112px) 12px 22px; }
}

/* Mobile: show hamburger, hide centre nav (in header only), compact right side */
@media (max-width: 960px){
  .il-nav-inner .header-nav{ display: none; }
  .nav-toggle{ display: flex; }
  .il-nav{
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.45rem;
  }
  .mobile-logo-bar{
    display: flex;
    justify-content: center;
    width: 100%;
    pointer-events: auto;
  }
  .mobile-logo-mark{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }
  .mobile-logo-img{
    height: 70px;
    width: auto;
  }
  .header-logo{ display: none; }
  .il-nav-inner{ gap: 0.75rem; padding: 0 0.9rem; border-radius: 18px; }
  .header-utility-pills{ gap: 0.4rem; }
  .site-btn, .logout-btn{ padding: 0.38rem 0.64rem; font-size: 0.75rem; min-height: 34px; }
  .signed-in-pill{ padding: 0.38rem 0.62rem; font-size: 0.7rem; }
  .site-kind-pill{ padding: 0.38rem 0.62rem; font-size: 0.7rem; }
  .environment-pill{ padding: 0.38rem 0.6rem; font-size: 0.7rem; }
  .nav-scrim{ top: calc(var(--nav-h) + 78px); }
  .nav-drawer{ top: calc(var(--nav-h) + 78px); }
}

@media (max-width: 980px){
  .nav-drawer .header-nav{
    align-items: stretch;
    justify-content: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .nav-drawer .header-nav a,
  .nav-drawer .header-nav summary{
    justify-content: space-between;
    width: 100%;
    padding: 0.8rem 0.4rem;
    height: auto;
  }

  .nav-drawer .header-nav a::after,
  .nav-drawer .header-nav summary::after{
    left: 0.4rem;
    right: 0.4rem;
    bottom: 0.2rem;
  }

  .nav-drawer .nav-group{
    width: 100%;
  }

  .nav-drawer .nav-submenu{
    position: static;
    transform: none;
    min-width: 0;
    margin: 0.15rem 0 0.35rem;
    background: rgba(255,255,255,0.03);
    box-shadow: none;
  }

  .nav-drawer .nav-submenu a{
    padding: 0.75rem 0.8rem;
  }
}

/* =========================
   Remove number input spinners (global)
   ========================= */

/* Chrome, Edge, Safari */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button{
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number]{
  -moz-appearance: textfield;
}

/* =========================
   Global support chat
   ========================= */

.support-chat-root{
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10020;
}

body.support-chat-open{
  overflow: hidden;
}

.support-chat-launcher{
  position: relative;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.96);
  color: #111827;
  padding: 0.78rem 1rem 0.78rem 0.84rem;
  min-height: 62px;
  display: inline-flex;
  align-items: center;
  gap: 0.72rem;
  box-shadow: 0 18px 42px rgba(15,23,42,0.14);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.support-chat-launcher:hover{
  transform: translateY(-1px);
  box-shadow: 0 22px 48px rgba(15,23,42,0.18);
}

.support-chat-launcher-mark,
.support-chat-avatar{
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: radial-gradient(circle at 35% 30%, #fca5a5, #1f2937 62%);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2);
}

.support-chat-launcher-dot,
.support-chat-avatar-dot{
  position: absolute;
  top: 5px;
  right: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 2px #ffffff;
}

.support-chat-launcher-spark,
.support-chat-avatar-glyph{
  font-weight: 900;
  font-size: 1rem;
  line-height: 1;
}

.support-chat-launcher-copy{
  display: grid;
  text-align: left;
  gap: 0.12rem;
}

.support-chat-launcher-copy strong{
  font-size: 0.94rem;
  line-height: 1.1;
}

.support-chat-launcher-copy span{
  font-size: 0.74rem;
  color: #6b7280;
}

.support-chat-unread-badge{
  min-width: 22px;
  height: 22px;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

.support-chat-scrim{
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.22);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.support-chat-panel{
  position: fixed;
  right: 22px;
  bottom: 94px;
  width: min(402px, calc(100vw - 24px));
  max-height: min(82vh, 760px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto auto;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 28px;
  border: 1px solid rgba(15,23,42,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,250,252,0.98));
  box-shadow: 0 28px 70px rgba(15,23,42,0.2);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
  color: #111827;
  overflow: hidden;
  overscroll-behavior: contain;
}

.support-chat-handle{
  display: none;
  width: 44px;
  height: 5px;
  margin: -0.15rem auto 0.05rem;
  border-radius: 999px;
  background: rgba(148,163,184,0.6);
}

.support-chat-root.open .support-chat-scrim{
  opacity: 1;
  pointer-events: auto;
}

.support-chat-root.open .support-chat-panel{
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.support-chat-head,
.support-chat-head-brand,
.support-chat-head-actions,
.support-chat-meta,
.support-chat-actions{
  display: flex;
  align-items: center;
}

.support-chat-head{
  justify-content: space-between;
  gap: 0.8rem;
}

.support-chat-head-brand{
  gap: 0.78rem;
  align-items: flex-start;
}

.support-chat-head-actions{
  gap: 0.55rem;
  flex-shrink: 0;
}

.support-chat-title{
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.2;
}

.support-chat-subtitle{
  margin-top: 0.18rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.support-chat-status-pill,
.support-chat-page{
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0.28rem 0.66rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
}

.support-chat-status-pill{
  background: rgba(15,23,42,0.06);
  color: #374151;
}

.support-chat-status-pill.is-open{
  background: rgba(34,197,94,0.12);
  color: #166534;
}

.support-chat-status-pill.is-off{
  background: rgba(148,163,184,0.18);
  color: #475569;
}

.support-chat-close{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.08);
  background: rgba(15,23,42,0.04);
  color: #374151;
  font-size: 1.35rem;
  cursor: pointer;
}

.support-chat-meta{
  flex-wrap: wrap;
  gap: 0.45rem;
}

.support-chat-page{
  background: rgba(15,23,42,0.05);
  color: #4b5563;
}

.support-chat-body{
  min-height: 0;
  min-width: 0;
  display: grid;
  gap: 0.55rem;
  overflow-x: hidden;
}

.support-chat-messages{
  min-height: 240px;
  max-height: 40vh;
  overflow-y: auto;
  overflow-x: hidden;
  min-width: 0;
  display: grid;
  gap: 0.7rem;
  padding: 0.2rem 0.1rem 0.2rem 0;
}

.support-chat-message{
  padding: 0.86rem 0.95rem;
  border-radius: 20px;
  border: 1px solid rgba(15,23,42,0.08);
  max-width: 86%;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.support-chat-message p{
  margin: 0;
  color: #111827;
  font-size: 0.92rem;
  line-height: 1.48;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.support-chat-message-assistant{
  background: #ffffff;
  justify-self: start;
}

.support-chat-message-user{
  background: #eef2ff;
  border-color: rgba(79,70,229,0.14);
  justify-self: end;
}

.support-chat-message-system{
  background: rgba(15,23,42,0.06);
  border-color: rgba(15,23,42,0.08);
  justify-self: center;
  max-width: 82%;
}

.support-chat-message-system p,
.support-chat-message-system .support-chat-message-meta{
  color: #475569;
  text-align: center;
}

.support-chat-message-meta{
  margin-top: 0.45rem;
  font-size: 0.73rem;
  color: #6b7280;
}

.support-chat-attachment{
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
  color: #1d4ed8;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}

.support-chat-typing{
  min-height: 20px;
  font-size: 0.78rem;
  color: #6b7280;
  padding-left: 0.15rem;
}

.support-chat-suggestions{
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.support-chat-chip{
  border: 1px solid rgba(15,23,42,0.08);
  background: #ffffff;
  color: #374151;
  border-radius: 999px;
  padding: 0.48rem 0.72rem;
  font-size: 0.77rem;
  cursor: pointer;
}

.support-chat-form{
  display: grid;
  gap: 0.55rem;
}

.support-chat-upload-row{
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.support-chat-upload{
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 0.8rem;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.08);
  background: #ffffff;
  color: #374151;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.support-chat-action{
  min-height: 38px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,0.08);
  background: #ffffff;
  color: #374151;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.support-chat-file{
  max-width: 100%;
  font-size: 0.76rem;
  color: #6b7280;
}

.support-chat-label{
  font-size: 0.8rem;
  font-weight: 600;
  color: #374151;
}

.support-chat-input{
  width: 100%;
  resize: none;
  border-radius: 18px;
  border: 1px solid rgba(15,23,42,0.08);
  background: #ffffff;
  color: #111827;
  padding: 0.9rem 1rem;
  font: inherit;
  min-height: 56px;
  max-height: 140px;
}

.support-chat-input:focus-visible,
.support-chat-send:focus-visible,
.support-chat-chip:focus-visible,
.support-chat-launcher:focus-visible,
.support-chat-action:focus-visible,
.support-chat-close:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.14);
}

.support-chat-actions{
  justify-content: space-between;
  gap: 0.8rem;
}

.support-chat-note{
  margin: 0;
  color: #6b7280;
  font-size: 0.73rem;
  line-height: 1.4;
}

.support-chat-send{
  border: 1px solid rgba(15,23,42,0.08);
  background: #f3f4f6;
  color: #111827;
  border-radius: 999px;
  min-height: 40px;
  min-width: 78px;
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}

.support-chat-send:disabled{
  opacity: 0.62;
  cursor: wait;
}

@media (max-width: 760px){
  .support-chat-root{
    right: 12px;
    left: 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
  }

  .support-chat-launcher{
    width: 100%;
    min-height: 60px;
    padding: 0.72rem 0.92rem 0.72rem 0.82rem;
    justify-content: flex-start;
    border-radius: 24px;
    box-shadow: 0 16px 36px rgba(15,23,42,0.18);
  }

  .support-chat-panel{
    right: 0;
    left: 0;
    bottom: 0;
    width: 100%;
    max-height: 100dvh;
    height: min(100dvh, 100%);
    padding: max(0.75rem, env(safe-area-inset-top, 0px)) 0.75rem calc(env(safe-area-inset-bottom, 0px) + 0.75rem);
    border-radius: 28px 28px 0 0;
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    gap: 0.65rem;
    grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    transform: translateY(24px);
    box-shadow: 0 -18px 50px rgba(15,23,42,0.24);
    background:
      linear-gradient(180deg, rgba(255,255,255,0.995), rgba(248,250,252,0.985));
  }

  .support-chat-handle{
    display: block;
  }

  .support-chat-head{
    align-items: center;
    gap: 0.7rem;
  }

  .support-chat-head-brand{
    min-width: 0;
    align-items: center;
  }

  .support-chat-head-brand > div{
    min-width: 0;
  }

  .support-chat-title{
    font-size: 1rem;
  }

  .support-chat-subtitle{
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .support-chat-head-actions{
    gap: 0.42rem;
  }

  .support-chat-status-pill{
    display: none;
  }

  .support-chat-action,
  .support-chat-close{
    min-height: 40px;
    height: 40px;
  }

  .support-chat-action{
    padding: 0 0.8rem;
    font-size: 0.8rem;
  }

  .support-chat-meta{
    flex-wrap: nowrap;
    gap: 0.45rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.1rem;
    scrollbar-width: none;
  }

  .support-chat-meta::-webkit-scrollbar{
    display: none;
  }

  .support-chat-page{
    flex: 0 0 auto;
    min-height: 28px;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .support-chat-body{
    gap: 0.4rem;
  }

  .support-chat-messages{
    min-height: 0;
    max-height: none;
    padding: 0.2rem 0;
    gap: 0.55rem;
  }

  .support-chat-message{
    max-width: min(84%, 21rem);
    padding: 0.72rem 0.84rem;
    border-radius: 18px;
  }

  .support-chat-message-system{
    max-width: 92%;
  }

  .support-chat-message p{
    font-size: 0.9rem;
    line-height: 1.42;
  }

  .support-chat-message-meta{
    margin-top: 0.38rem;
    font-size: 0.69rem;
  }

  .support-chat-suggestions{
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 0.15rem;
    margin: 0 -0.1rem;
    scrollbar-width: none;
  }

  .support-chat-suggestions::-webkit-scrollbar{
    display: none;
  }

  .support-chat-chip{
    flex: 0 0 auto;
    min-height: 36px;
    padding: 0.52rem 0.82rem;
    white-space: nowrap;
  }

  .support-chat-form{
    gap: 0.5rem;
    padding-top: 0.1rem;
  }

  .support-chat-label{
    display: none;
  }

  .support-chat-input{
    min-height: 52px;
    max-height: 132px;
    border-radius: 20px;
    padding: 0.82rem 0.95rem;
    font-size: 16px;
    line-height: 1.35;
  }

  .support-chat-upload-row{
    justify-content: space-between;
    gap: 0.5rem;
  }

  .support-chat-upload{
    min-height: 36px;
    padding: 0 0.82rem;
  }

  .support-chat-file{
    max-width: 48%;
  }

  .support-chat-actions{
    align-items: stretch;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
  }

  .support-chat-send{
    width: auto;
    min-width: 84px;
    min-height: 52px;
    padding: 0 1.05rem;
    align-self: end;
  }

  .support-chat-note{
    font-size: 0.68rem;
    line-height: 1.35;
    max-height: 3.7em;
    overflow: hidden;
  }
}

@media (max-width: 480px){
  .support-chat-root{
    right: 10px;
    left: 10px;
  }

  .support-chat-launcher-copy span{
    display: none;
  }

  .support-chat-panel{
    padding-left: 0.68rem;
    padding-right: 0.68rem;
  }

  .support-chat-avatar,
  .support-chat-launcher-mark{
    width: 38px;
    height: 38px;
  }

  .support-chat-message{
    max-width: 88%;
  }

  .support-chat-actions{
    grid-template-columns: 1fr;
  }

  .support-chat-send{
    width: 100%;
  }

  .support-chat-file{
    max-width: 100%;
  }
}




