:root {
  --sdvc-navy: #102c4d;
  --sdvc-navy-2: #173a5c;
  --sdvc-teal: #467c80;
  --sdvc-gold: #ccb069;
  --sdvc-cream: #f7f4ed;
  --sdvc-ink: #17263a;
  --sdvc-muted: #65717f;
  --sdvc-line: #dce3e4;
  --sdvc-white: #fff;
}

.sdvc, .sdvc * , .sdvc-chat, .sdvc-chat * { box-sizing: border-box; }

.sdvc {
  display: grid;
  grid-template-columns: minmax(240px, .72fr) minmax(320px, 1.28fr);
  max-width: 1120px;
  margin: 40px auto;
  border-radius: 28px;
  overflow: hidden;
  background: var(--sdvc-white);
  box-shadow: 0 18px 55px rgba(16, 44, 77, .14);
  color: var(--sdvc-ink);
  font-family: inherit;
}

.sdvc__intro {
  padding: clamp(30px, 5vw, 58px);
  color: var(--sdvc-white);
  background: linear-gradient(155deg, var(--sdvc-navy), #1d4c67);
}

.sdvc__eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--sdvc-gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.sdvc h2, .sdvc-join h2 { margin: 0 0 18px; font-family: Georgia, serif; font-size: clamp(30px, 4vw, 45px); line-height: 1.08; }
.sdvc__intro p { color: rgba(255,255,255,.82); font-size: 17px; line-height: 1.65; }
.sdvc__help { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.18); }
.sdvc__help strong { display: block; font-size: 13px; }
.sdvc__help a { color: var(--sdvc-white); font-size: 19px; text-decoration-thickness: 1px; }

.sdvc__form { padding: clamp(28px, 5vw, 54px); }
.sdvc__trap { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.sdvc__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sdvc__field { display: flex; flex-direction: column; gap: 7px; margin: 0; }
.sdvc__field--wide { grid-column: 1 / -1; }
.sdvc__field > span { color: var(--sdvc-ink); font-size: 14px; font-weight: 750; }
.sdvc__field input, .sdvc__field select, .sdvc__field textarea {
  width: 100%; min-height: 50px; margin: 0; padding: 11px 13px;
  border: 1px solid var(--sdvc-line); border-radius: 11px; background: #fbfcfc;
  color: var(--sdvc-ink); font: inherit; box-shadow: none;
}
.sdvc__field textarea { min-height: 90px; resize: vertical; }
.sdvc__field input:focus, .sdvc__field select:focus, .sdvc__field textarea:focus { outline: 3px solid rgba(70,124,128,.2); border-color: var(--sdvc-teal); }
.sdvc__field small { color: var(--sdvc-muted); font-size: 12px; line-height: 1.4; }
.sdvc__consent { display: flex; gap: 10px; margin: 20px 0 12px; color: var(--sdvc-muted); font-size: 13px; line-height: 1.45; }
.sdvc__consent input { flex: 0 0 auto; width: 17px; height: 17px; margin-top: 2px; }
.sdvc__urgent { margin: 14px 0 20px; padding: 12px 14px; border-radius: 10px; background: #fff5ed; color: #7a381d; font-size: 13px; }
.sdvc__submit { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 52px; padding: 13px 24px; border: 0; border-radius: 999px; background: var(--sdvc-gold); color: var(--sdvc-navy); font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }
.sdvc__submit:hover { background: #d9bd76; color: var(--sdvc-navy); transform: translateY(-1px); }
.sdvc__submit:disabled { opacity: .58; cursor: wait; }
.sdvc__notice { grid-column: 1 / -1; margin-bottom: 18px; padding: 14px 16px; border-radius: 10px; line-height: 1.45; }
.sdvc__notice--success { background: #e9f6ef; color: #195c3b; }
.sdvc__notice--error { background: #fff0ee; color: #8d3026; }

.sdvc-join { max-width: 720px; margin: 50px auto; padding: clamp(30px, 6vw, 60px); border: 1px solid var(--sdvc-line); border-radius: 24px; background: var(--sdvc-white); color: var(--sdvc-ink); text-align: center; box-shadow: 0 16px 48px rgba(16,44,77,.1); }
.sdvc-join p { margin: 0 auto 24px; color: var(--sdvc-muted); font-size: 17px; line-height: 1.6; }
.sdvc-join--error { border-top: 5px solid #bd4b3e; }
.sdvc-join--consent { text-align: left; }
.sdvc-join--consent .sdvc__eyebrow { color: var(--sdvc-teal); }
.sdvc-join--consent p { margin-left: 0; margin-right: 0; }
.sdvc-join--consent .sdvc-join__patient { font-weight: 700; color: var(--sdvc-ink); }
.sdvc-join--consent form { display: grid; gap: 16px; margin: 24px 0; }
.sdvc-join--consent form > label:not(.sdvc-join__agree) { display: grid; gap: 6px; font-weight: 700; }
.sdvc-join--consent input[type="text"], .sdvc-join--consent select { width: 100%; min-height: 46px; padding: 9px 12px; border: 1px solid var(--sdvc-line); border-radius: 9px; font: inherit; }
.sdvc-join--consent .sdvc-join__agree { display: flex; gap: 10px; align-items: flex-start; line-height: 1.5; }
.sdvc-join--consent .sdvc-join__agree input { margin-top: 5px; flex: 0 0 auto; }
.sdvc-join--consent .sdvc-join__note { font-size: 14px; }

.sdvc-chat { position: fixed; z-index: 99990; right: 22px; bottom: 22px; font-family: inherit; color: var(--sdvc-ink); }
.sdvc-chat__toggle { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 7px 18px 7px 7px; border: 0; border-radius: 999px; background: var(--sdvc-navy); color: #fff; box-shadow: 0 10px 32px rgba(10,31,56,.28); font: inherit; font-weight: 750; cursor: pointer; }
.sdvc-chat__bubble { width: 44px; height: 44px; overflow: hidden; border: 2px solid rgba(255,255,255,.8); border-radius: 50%; background: #fff; }
.sdvc-chat__bubble img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sdvc-chat__panel { position: absolute; right: 0; bottom: 70px; width: min(370px, calc(100vw - 28px)); height: min(570px, calc(100vh - 110px)); overflow: hidden; border: 1px solid rgba(16,44,77,.12); border-radius: 20px; background: #fff; box-shadow: 0 22px 70px rgba(10,31,56,.25); }
.sdvc-chat__panel:not([hidden]) { display: flex; flex-direction: column; animation: sdvc-chat-in .2s ease-out; }
@keyframes sdvc-chat-in { from { opacity: 0; transform: translateY(9px) scale(.98); } }
.sdvc-chat__header { display: flex; align-items: center; gap: 11px; padding: 15px 16px; background: linear-gradient(135deg, var(--sdvc-navy), var(--sdvc-navy-2)); color: #fff; }
.sdvc-chat__header > img { width: 42px; height: 42px; border: 2px solid #fff; border-radius: 50%; object-fit: cover; }
.sdvc-chat__header > div { display: flex; flex: 1; flex-direction: column; }
.sdvc-chat__header small { margin-top: 2px; color: rgba(255,255,255,.7); font-size: 11px; }
.sdvc-chat__header button { width: 32px; height: 32px; border: 0; background: transparent; color: #fff; font-size: 27px; cursor: pointer; }
.sdvc-chat__messages { flex: 1; overflow-y: auto; padding: 17px; background: #f5f8f8; }
.sdvc-chat__message { width: fit-content; max-width: 88%; margin-bottom: 11px; padding: 10px 13px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; }
.sdvc-chat__message--bot { border-bottom-left-radius: 4px; background: #fff; box-shadow: 0 2px 7px rgba(16,44,77,.08); }
.sdvc-chat__message--user { margin-left: auto; border-bottom-right-radius: 4px; background: var(--sdvc-navy); color: #fff; }
.sdvc-chat__message a { color: var(--sdvc-teal); font-weight: 750; }
.sdvc-chat__suggestions { display: flex; gap: 7px; overflow-x: auto; padding: 10px 13px; border-top: 1px solid var(--sdvc-line); }
.sdvc-chat__suggestions button { flex: 0 0 auto; padding: 7px 10px; border: 1px solid #cbd9da; border-radius: 999px; background: #fff; color: var(--sdvc-navy); font: inherit; font-size: 12px; cursor: pointer; }
.sdvc-chat__form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--sdvc-line); }
.sdvc-chat__form input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--sdvc-line); border-radius: 10px; font: inherit; font-size: 14px; }
.sdvc-chat__form button { flex: 0 0 41px; border: 0; border-radius: 10px; background: var(--sdvc-gold); color: var(--sdvc-navy); font-size: 20px; font-weight: 800; cursor: pointer; }
.sdvc-chat footer { padding: 0 12px 9px; color: var(--sdvc-muted); font-size: 10px; text-align: center; }

@media (max-width: 760px) {
  .sdvc { grid-template-columns: 1fr; margin: 20px 12px; border-radius: 20px; }
  .sdvc__intro, .sdvc__form { padding: 28px 22px; }
  .sdvc__grid { grid-template-columns: 1fr; }
  .sdvc__field--wide { grid-column: auto; }
  .sdvc-chat { right: 14px; bottom: 14px; }
  .sdvc-chat__toggle-label { display: none; }
  .sdvc-chat__toggle { padding: 6px; }
  .sdvc-chat__panel { right: 0; bottom: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .sdvc-chat__panel:not([hidden]) { animation: none; }
  .sdvc__submit { transition: none; }
}
