/**
 * SdT Copilot drawer — brand palette (DESIGN.md tokens, hardcoded here
 * because the module ships independently of the theme's SCSS pipeline).
 */

.sdtc-root { position: fixed; inset: 0; z-index: 1200; pointer-events: none; visibility: hidden; }
.sdtc-root.is-open { pointer-events: auto; visibility: visible; }
body.sdtc-lock { overflow: hidden; }

.sdtc-overlay { position: absolute; inset: 0; background: rgba(0, 27, 82, 0.35); opacity: 0; transition: opacity 0.25s ease-out; }
.sdtc-root.is-open .sdtc-overlay { opacity: 1; }

.sdtc-drawer {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(720px, 100vw);
  display: flex; flex-direction: column;
  background: #f8f9fa; color: #2d2f34;
  box-shadow: -18px 0 44px rgba(0, 47, 133, 0.18);
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
  font-family: 'GeneralSans-Variable', system-ui, sans-serif;
}
.sdtc-root.is-open .sdtc-drawer { transform: none; }
@media (prefers-reduced-motion: reduce) {
  .sdtc-drawer, .sdtc-overlay { transition: none; }
}
@media (max-width: 640px) {
  .sdtc-drawer { width: 100vw; }
}

.sdtc-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 20px 22px; background: #002f85; color: #fff;
}
.sdtc-eyebrow { margin: 0; font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: #8dafef; }
.sdtc-title { margin: 4px 0 0; font-family: 'Parkinsans', system-ui, sans-serif; font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -0.01em; }
.sdtc-close { background: none; border: 0; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.sdtc-close:focus-visible { outline: 2px solid #8dafef; outline-offset: 2px; }

.sdtc-messages { flex: 1; overflow-y: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 10px; }

.sdtc-bubble { max-width: 85%; padding: 13px 16px; border-radius: 12px; font-size: 16px; line-height: 1.55; white-space: pre-wrap; color: #111827; font-weight: 500; }
.sdtc-bubble--assistant { background: #fff; border: 1px solid #e8ecf3; align-self: flex-start; border-bottom-left-radius: 4px; }
.sdtc-bubble--user { background: #1551c1; color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.sdtc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.sdtc-chip {
  border: 1.5px solid #1551c1; background: #eef3fc; color: #0f3fa0;
  border-radius: 999px; padding: 9px 18px; font-size: 15px; font-weight: 700; cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out, box-shadow 0.15s ease-out;
}
.sdtc-chip:hover { background: #1551c1; color: #fff; box-shadow: 0 4px 12px rgba(21, 81, 193, 0.25); }
.sdtc-chip:focus-visible { outline: 2px solid #1551c1; outline-offset: 2px; }
.sdtc-chip--primary { background: #1551c1; color: #fff; }
.sdtc-chip--primary:hover { background: #0f3fa0; }
.sdtc-chip--retry { border-color: #b3541e; background: #fdf1e7; color: #8a3c0f; }
.sdtc-chip--retry:hover { background: #b3541e; color: #fff; }

.sdtc-status { padding: 4px 20px 10px; font-size: 14.5px; color: #49505e; font-style: italic; }

.sdtc-cards-head {
  margin: 4px 2px 0; font-size: 15px; font-weight: 600; color: #002f85;
}
.sdtc-cards { display: flex; flex-direction: column; gap: 10px; }
.sdtc-card {
  display: flex; gap: 14px; background: #fff; border: 1px solid #e8ecf3;
  border-radius: 12px; padding: 12px; align-items: stretch;
}
.sdtc-card-thumb {
  position: relative; width: 96px; height: 96px; flex: 0 0 auto; align-self: center;
  border: 0; padding: 0; border-radius: 10px; overflow: hidden; cursor: zoom-in; background: #eef1f6;
}
.sdtc-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sdtc-card-thumb:hover img { transform: scale(1.06); transition: transform 0.2s ease-out; }
.sdtc-card-thumb:focus-visible { outline: 2px solid #1551c1; outline-offset: 2px; }
.sdtc-card-gallery-badge {
  position: absolute; right: 5px; bottom: 5px;
  background: rgba(0, 47, 133, 0.82); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 1px 6px; line-height: 1.4;
}
.sdtc-card-gallery-badge::before { content: '\1F5BC\FE0E'; margin-right: 3px; }

/* Image lightbox */
.sdtc-lightbox {
  position: absolute; inset: 0; z-index: 20; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 10px;
  background: rgba(0, 20, 60, 0.86); padding: 20px;
}
.sdtc-lightbox-bar { position: absolute; top: 12px; right: 14px; left: 14px; display: flex; align-items: center; justify-content: space-between; }
.sdtc-lightbox-count { color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; }
.sdtc-lightbox-close { background: none; border: 0; color: #fff; font-size: 30px; line-height: 1; cursor: pointer; padding: 0 6px; }
.sdtc-lightbox-stage { max-width: 100%; max-height: 74vh; display: flex; }
.sdtc-lightbox-stage img { max-width: 100%; max-height: 74vh; object-fit: contain; border-radius: 8px; background: #fff; }
.sdtc-lightbox-caption { color: #fff; font-size: 14.5px; font-weight: 600; text-align: center; margin: 0; max-width: 90%; }
.sdtc-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 26px; line-height: 1;
}
.sdtc-lightbox-nav:hover { background: rgba(255, 255, 255, 0.3); }
.sdtc-lightbox-prev { left: 12px; }
.sdtc-lightbox-next { right: 12px; }
.sdtc-lightbox-close:focus-visible, .sdtc-lightbox-nav:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sdtc-card-body { min-width: 0; display: flex; flex-direction: column; gap: 5px; flex: 1; justify-content: center; }
.sdtc-card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.sdtc-card-tag {
  font-size: 11.5px; font-weight: 600; color: #3f4654; background: #eef1f6;
  border-radius: 999px; padding: 2px 9px; line-height: 1.5;
}
.sdtc-card-title { font-weight: 700; font-size: 16px; color: #16233f; text-decoration: none; line-height: 1.3; }
.sdtc-card-title:hover { color: #1551c1; }
.sdtc-card-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.sdtc-card-pick {
  border: 0; background: #1551c1; color: #fff;
  border-radius: 999px; padding: 7px 16px; font-size: 13.5px; font-weight: 700; cursor: pointer;
  transition: background 0.15s ease-out;
}
.sdtc-card-pick:hover { background: #0f3fa0; }
.sdtc-card-pick.is-on { background: #eef3fc; color: #0f3fa0; box-shadow: inset 0 0 0 1.5px #1551c1; }
.sdtc-card-view { font-size: 13.5px; font-weight: 600; color: #1551c1; text-decoration: none; white-space: nowrap; }
.sdtc-card-view::after { content: ' \2197'; }
.sdtc-card-view:hover { text-decoration: underline; }

/* Triple-class selector: the theme styles generic forms per page type
   (.page-node-type-* form:not(.dfd-searchbox)) with higher specificity. */
.sdtc-root .sdtc-drawer .sdtc-form {
  display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid #e8ecf3; background: #fff;
  width: 100%; max-width: none; margin: 0; box-sizing: border-box; flex-wrap: nowrap;
}
.sdtc-input {
  flex: 1; min-width: 0; resize: none; border: 1px solid #e8ecf3; border-radius: 8px;
  padding: 11px 13px; font: inherit; font-size: 16px; color: #2d2f34;
}
.sdtc-input:focus { border-color: #1551c1; outline: 2px solid #1551c1; outline-offset: 1px; }
.sdtc-send {
  border: 0; background: #1551c1; color: #fff; font-weight: 700;
  border-radius: 8px; padding: 0 20px; cursor: pointer; font-size: 15.5px;
}
.sdtc-send:disabled { opacity: 0.6; cursor: default; }
.sdtc-send:focus-visible { outline: 2px solid #002f85; outline-offset: 2px; }

.sdtc-foot { padding: 12px 18px 14px; background: #fff; border-top: 1px solid #e8ecf3; display: flex; flex-direction: column; gap: 8px; }
.sdtc-cta {
  display: block; text-align: center; background: #1551c1; color: #fff;
  font-weight: 700; padding: 12px; border-radius: 8px; text-decoration: none; font-size: 15px;
}
.sdtc-cta:hover { background: #11429d; color: #fff; }
.sdtc-contacts { margin: 0; text-align: center; font-size: 13.5px; color: #49505e; }

/* Entry-point chip (hero) */
.sdtc-launcher-chip {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid #1551c1; background: #fff; color: #1551c1;
  border-radius: 999px; padding: 9px 16px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.15s ease-out, color 0.15s ease-out;
}
.sdtc-launcher-chip:hover { background: #1551c1; color: #fff; }

.sdtc-hero-launcher { display: flex; justify-content: center; margin: 26px 0 6px; }

/* Assistant invite capsule (homepage hero) */
.sdtc-invite {
  display: inline-flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid #dbe4f5; border-radius: 999px;
  padding: 9px 20px 9px 10px; cursor: pointer; text-align: left;
  box-shadow: 0 2px 10px rgba(0, 47, 133, 0.08);
  transition: box-shadow 0.2s ease-out, transform 0.2s ease-out, border-color 0.2s ease-out;
}
.sdtc-invite:hover {
  border-color: #1551c1; transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 47, 133, 0.16);
}
.sdtc-invite:focus-visible { outline: 2px solid #1551c1; outline-offset: 3px; }
.sdtc-invite-badge {
  position: relative; display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 999px; flex: 0 0 auto;
  background: #1551c1; color: #fff;
}
.sdtc-invite-dot {
  position: absolute; right: 1px; bottom: 1px;
  width: 10px; height: 10px; border-radius: 999px;
  background: #2fbf71; border: 2px solid #fff;
  animation: sdtc-dot-pulse 2.4s infinite ease-out;
}
@keyframes sdtc-dot-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(47, 191, 113, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(47, 191, 113, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .sdtc-invite-dot { animation: none; }
  .sdtc-invite:hover { transform: none; }
}
.sdtc-invite-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sdtc-invite-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: #1551c1;
}
.sdtc-invite-title { font-size: 15.5px; color: #2d2f34; line-height: 1.3; }
.sdtc-invite-title strong { color: #002f85; }
.sdtc-invite-arrow {
  display: grid; place-items: center; color: #1551c1; flex: 0 0 auto;
  transition: transform 0.2s ease-out;
}
.sdtc-invite:hover .sdtc-invite-arrow { transform: translateX(3px); }
@media (max-width: 480px) {
  .sdtc-invite { gap: 10px; padding-right: 14px; }
  .sdtc-invite-title { font-size: 14px; }
}
.sdtc-catalog-invite { display: flex; justify-content: flex-end; margin: 10px 0 16px; }
.sdtc-catalog-invite .sdtc-invite { border-radius: 14px; }
.sdtc-catalog-invite .sdtc-invite-title { font-size: 14.5px; }

/* Persistent launcher pill: floating bottom center, alive AI accent.
   Bottom right is taken by the theme's scroll-to-top buttons. */
@property --sdtc-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.sdtc-fab {
  position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%);
  z-index: 1190;
  display: inline-flex; align-items: center; gap: 10px;
  border: 2px solid transparent; border-radius: 999px;
  /* Two backgrounds: solid white inside, rotating indigo ring on the border. */
  background:
    linear-gradient(#fff, #fff) padding-box,
    conic-gradient(from var(--sdtc-angle),
      #dbe4f5 0%, #dbe4f5 64%,
      #6366f1 78%, #a78bfa 86%, #dbe4f5 96%) border-box;
  padding: 8px 20px 8px 9px; cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 47, 133, 0.18);
  animation: sdtc-ring 4s linear infinite;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}
@keyframes sdtc-ring {
  to { --sdtc-angle: 360deg; }
}
.sdtc-fab:hover { transform: translateX(-50%) translateY(-2px); }
.sdtc-fab:focus-visible { outline: 2px solid #6366f1; outline-offset: 3px; }
.sdtc-fab.is-hidden { opacity: 0; pointer-events: none; }
.sdtc-fab-badge { width: 40px; height: 40px; }
.sdtc-fab-label { font-size: 14.5px; font-weight: 700; color: #002f85; letter-spacing: 0.01em; }
@media (max-width: 640px) {
  .sdtc-fab { bottom: 12px; padding: 7px 16px 7px 8px; }
  .sdtc-fab-badge { width: 36px; height: 36px; }
  .sdtc-fab-label { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .sdtc-fab { animation: none; }
  .sdtc-fab:hover { transform: translateX(-50%); }
}

/* Product-page invite: realtime advisor CTA under the quote button */
.sdtc-product-invite {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1.5px solid #dbe4f5; border-radius: 14px;
  padding: 10px 16px 10px 10px; text-decoration: none; cursor: pointer;
  transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out;
}
.sdtc-product-invite:hover {
  border-color: #1551c1; box-shadow: 0 6px 20px rgba(0, 47, 133, 0.14);
  text-decoration: none;
}
.sdtc-product-invite .sdtc-invite-title { font-size: 15px; }
.sdtc-invite-badge--sm { width: 38px; height: 38px; }

/* Header actions */
.sdtc-head-actions { display: flex; align-items: center; gap: 10px; }
.sdtc-reset {
  background: none; border: 1px solid rgba(255, 255, 255, 0.35); color: #fff;
  border-radius: 999px; padding: 5px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: background 0.15s ease-out;
}
.sdtc-reset:hover { background: rgba(255, 255, 255, 0.12); }
.sdtc-reset:focus-visible { outline: 2px solid #8dafef; outline-offset: 2px; }

/* Assistant markdown */
.sdtc-bubble--assistant .sdtc-md-p { margin: 0 0 10px; }
.sdtc-bubble--assistant .sdtc-md-p:last-child { margin-bottom: 0; }
.sdtc-bubble--assistant .sdtc-md-list { margin: 0 0 10px; padding-left: 18px; display: grid; gap: 5px; }
.sdtc-bubble--assistant .sdtc-md-list:last-child { margin-bottom: 0; }
.sdtc-bubble--assistant .sdtc-md-list li::marker { color: #1551c1; }
.sdtc-bubble--assistant strong { font-weight: 700; color: #16233f; }
.sdtc-bubble--assistant a { color: #1551c1; font-weight: 600; }

/* Typing indicator */
.sdtc-typing { display: inline-flex; align-items: center; gap: 5px; padding: 14px 16px; }
.sdtc-typing .sdtc-dot {
  width: 7px; height: 7px; border-radius: 999px; background: #8dafef;
  animation: sdtc-bounce 1.2s infinite ease-in-out;
}
.sdtc-typing .sdtc-dot:nth-child(2) { animation-delay: 0.15s; }
.sdtc-typing .sdtc-dot:nth-child(3) { animation-delay: 0.3s; }
.sdtc-typing.has-status::after {
  content: attr(data-status);
  margin-left: 8px; font-size: 14px; color: #49505e; font-style: italic;
}
@keyframes sdtc-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.55; }
  30% { transform: translateY(-4px); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sdtc-typing .sdtc-dot { animation: none; }
}

/* Card hover */
.sdtc-card { transition: border-color 0.15s ease-out, box-shadow 0.15s ease-out; }
.sdtc-card:hover { border-color: #b4cdfa; box-shadow: 0 4px 16px rgba(21, 81, 193, 0.08); }
