/* =============================================================
   DSolutions — concierge ("Pregúntale a DSolutions")
   Floating pill → dark dossier panel. Always dark, in both site themes.
   Prefix: .dsc-
   ============================================================= */

.dsc-root {
  --dsc-ink: #0A1322;
  --dsc-ink-2: #101C30;
  --dsc-bone: #F1ECE0;
  --dsc-bone-dim: rgba(241, 236, 224, 0.62);
  --dsc-bone-faint: rgba(241, 236, 224, 0.38);
  --dsc-signal: #4A8AD8;
  --dsc-signal-soft: #8DB6EA;
  --dsc-line: rgba(241, 236, 224, 0.09);
  --dsc-line-2: rgba(241, 236, 224, 0.16);
  --dsc-lift: 0px;
  --dsc-ease: cubic-bezier(0.22, 1, 0.36, 1);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--dsc-bone);
}
.dsc-root *, .dsc-root *::before, .dsc-root *::after { box-sizing: border-box; }

/* ---------- the orb: the concierge's presence ---------- */
.dsc-orb {
  position: relative;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #FFFFFF 0 5%, #D7E6FA 9%, rgba(141, 182, 234, 0.9) 22%, #4A8AD8 42%, #1B4E85 66%, #0A1322 100%);
  box-shadow:
    inset -5px -7px 12px rgba(0, 0, 0, 0.5),
    inset 3px 4px 8px rgba(255, 255, 255, 0.22),
    0 0 0 1px rgba(141, 182, 234, 0.25),
    0 0 22px rgba(74, 138, 216, 0.55);
  overflow: hidden;
  animation: dsc-breathe 4.8s ease-in-out infinite;
}
.dsc-orb::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 50%, rgba(241, 236, 224, 0.06) 58%, rgba(241, 236, 224, 0.22) 66%, rgba(241, 236, 224, 0.34) 71%, rgba(241, 236, 224, 0.22) 76%, rgba(241, 236, 224, 0.06) 84%, transparent 92%);
  mix-blend-mode: screen;
  animation: dsc-spin 7s linear infinite;
}
.dsc-orb::after {
  content: "";
  position: absolute;
  left: 18%; top: 12%;
  width: 34%; height: 22%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.85), transparent);
  transform: rotate(-24deg);
}
.dsc-orb--lg { width: 42px; height: 42px; }
.dsc-orb--sm { width: 18px; height: 18px; box-shadow: inset -3px -4px 7px rgba(0,0,0,0.5), 0 0 12px rgba(74,138,216,0.45); }
.dsc-root.is-thinking .dsc-orb::before { animation-duration: 1.1s; }
.dsc-root.is-thinking .dsc-orb { animation-duration: 1.2s; }

@keyframes dsc-spin { to { transform: rotate(360deg); } }
@keyframes dsc-breathe {
  0%, 100% { box-shadow: inset -5px -7px 12px rgba(0,0,0,0.5), inset 3px 4px 8px rgba(255,255,255,0.22), 0 0 0 1px rgba(141,182,234,0.25), 0 0 16px rgba(74,138,216,0.4); }
  50%      { box-shadow: inset -5px -7px 12px rgba(0,0,0,0.5), inset 3px 4px 8px rgba(255,255,255,0.22), 0 0 0 1px rgba(141,182,234,0.35), 0 0 30px rgba(74,138,216,0.75); }
}

/* ---------- launcher pill ---------- */
.dsc-launcher {
  position: fixed;
  right: 22px;
  bottom: calc(22px + var(--dsc-lift) + env(safe-area-inset-bottom));
  z-index: 9990;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 20px 9px 9px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  color: var(--dsc-bone);
  font: inherit;
  text-align: left;
  background:
    linear-gradient(var(--dsc-ink), var(--dsc-ink)) padding-box,
    linear-gradient(120deg, rgba(141,182,234,0.7), rgba(241,236,224,0.12) 40%, rgba(241,236,224,0.08) 60%, rgba(74,138,216,0.6)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 18px 40px -12px rgba(10, 19, 34, 0.55), 0 2px 6px rgba(10, 19, 34, 0.25);
  transition: transform 260ms var(--dsc-ease), box-shadow 260ms var(--dsc-ease), opacity 200ms, bottom 300ms var(--dsc-ease);
  overflow: hidden;
}
.dsc-launcher::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: -40%;
  width: 30%;
  background: linear-gradient(100deg, transparent, rgba(241,236,224,0.16), transparent);
  transform: skewX(-18deg);
  animation: dsc-sheen 6.5s 1.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes dsc-sheen { 0%, 70% { left: -40%; } 100% { left: 130%; } }
.dsc-launcher:hover { transform: translateY(-2px); box-shadow: 0 24px 48px -12px rgba(10,19,34,0.65), 0 2px 6px rgba(10,19,34,0.25); }
.dsc-launcher:focus-visible { outline: 2px solid var(--dsc-signal); outline-offset: 3px; }
.dsc-launcher-txt { display: flex; flex-direction: column; line-height: 1.2; }
.dsc-launcher-t { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.dsc-launcher-s { font-size: 11.5px; color: var(--dsc-bone-dim); display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.dsc-sub-t { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsc-live { flex: none; width: 6px; height: 6px; border-radius: 50%; background: #5FD39A; box-shadow: 0 0 0 3px rgba(95, 211, 154, 0.18); }
.dsc-root.is-open .dsc-launcher { opacity: 0; pointer-events: none; transform: translateY(8px) scale(0.96); }

/* first-visit whisper above the launcher */
.dsc-whisper {
  position: fixed;
  right: 22px;
  bottom: calc(92px + var(--dsc-lift) + env(safe-area-inset-bottom));
  z-index: 9990;
  max-width: 270px;
  padding: 13px 38px 13px 16px;
  border-radius: 16px 16px 4px 16px;
  background: var(--dsc-bone);
  color: #0F1B2D;
  font-size: 13.5px;
  line-height: 1.45;
  box-shadow: 0 18px 40px -14px rgba(10, 19, 34, 0.45);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms var(--dsc-ease), transform 320ms var(--dsc-ease);
  pointer-events: none;
}
.dsc-whisper.is-on { opacity: 1; transform: none; pointer-events: auto; cursor: pointer; }
.dsc-whisper b { font-weight: 600; }
.dsc-whisper-x {
  position: absolute; top: 6px; right: 6px;
  width: 26px; height: 26px; border: 0; border-radius: 50%;
  background: transparent; color: #5B6472; cursor: pointer; font-size: 16px; line-height: 1;
}
.dsc-whisper-x:hover { background: rgba(15, 27, 45, 0.07); }

/* ---------- panel ---------- */
.dsc-panel {
  position: fixed;
  right: 22px;
  bottom: calc(22px + var(--dsc-lift) + env(safe-area-inset-bottom));
  z-index: 10001; /* above the consent bar (9999) while open */
  width: 408px;
  height: min(660px, calc(100dvh - 44px - var(--dsc-lift)));
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(120% 60% at 100% 0%, rgba(74, 138, 216, 0.20), transparent 60%),
    radial-gradient(90% 50% at 0% 100%, rgba(241, 236, 224, 0.05), transparent 70%),
    linear-gradient(180deg, var(--dsc-ink-2), var(--dsc-ink));
  border: 1px solid var(--dsc-line-2);
  box-shadow: 0 40px 90px -20px rgba(5, 10, 20, 0.7), 0 0 0 1px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.97);
  transform-origin: 100% 100%;
  transition: opacity 280ms var(--dsc-ease), transform 380ms var(--dsc-ease), visibility 0s 380ms;
}
.dsc-root.is-open .dsc-panel {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 280ms var(--dsc-ease), transform 380ms var(--dsc-ease), visibility 0s;
}
/* fine grain so the dark reads as material, not flat fill */
.dsc-panel::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/></filter><rect width='120' height='120' filter='url(%23n)'/></svg>");
}

.dsc-head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 18px 18px 22px;
  border-bottom: 1px solid var(--dsc-line);
}
.dsc-head-txt { flex: 1; min-width: 0; }
.dsc-title { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 15.5px; font-weight: 600; letter-spacing: -0.015em; color: var(--dsc-bone); }
.dsc-sub { margin: 3px 0 0; font-size: 12px; color: var(--dsc-bone-dim); display: flex; align-items: center; gap: 6px; }
.dsc-icon-btn {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 1px solid var(--dsc-line);
  border-radius: 50%;
  background: rgba(241, 236, 224, 0.03);
  color: var(--dsc-bone-dim);
  cursor: pointer;
  transition: background 160ms, color 160ms, border-color 160ms;
}
.dsc-icon-btn:hover { background: rgba(241, 236, 224, 0.08); color: var(--dsc-bone); border-color: var(--dsc-line-2); }
.dsc-icon-btn:focus-visible { outline: 2px solid var(--dsc-signal); outline-offset: 2px; }
.dsc-icon-btn svg { width: 16px; height: 16px; }
.dsc-lang {
  flex: none;
  display: flex;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--dsc-line);
  background: rgba(241, 236, 224, 0.03);
}
.dsc-lang button {
  min-width: 34px; height: 26px; padding: 0 8px;
  border: 0; border-radius: 999px;
  background: transparent;
  color: var(--dsc-bone-dim);
  font: inherit; font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.dsc-lang button:hover { color: var(--dsc-bone); }
.dsc-lang button.is-on { background: var(--dsc-bone); color: #0F1B2D; }
.dsc-lang button:focus-visible { outline: 2px solid var(--dsc-signal); outline-offset: 1px; }
.dsc-back { display: none; }
.dsc-root.is-chat .dsc-back { display: grid; }

.dsc-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(241,236,224,0.15) transparent;
}

/* index of questions */
.dsc-index { padding: 26px 16px 20px; }
.dsc-hello { padding: 0 10px 22px; }
.dsc-hello-h { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; color: var(--dsc-bone); }
.dsc-hello-s { margin: 8px 0 0; font-size: 14px; line-height: 1.5; color: var(--dsc-bone-dim); }
.dsc-q.dsc-q--extra { display: none; }
.dsc-root.is-all .dsc-q.dsc-q--extra { display: flex; }
.dsc-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 6px 0 0 46px; padding: 6px 0;
  border: 0; background: transparent;
  color: var(--dsc-signal-soft);
  font: inherit; font-size: 13px; cursor: pointer;
}
.dsc-toggle:hover { color: var(--dsc-bone); }
.dsc-toggle:focus-visible { outline: 2px solid var(--dsc-signal); outline-offset: 2px; border-radius: 6px; }
.dsc-root.is-chat .dsc-index { display: none; }
.dsc-eyebrow {
  margin: 0 8px 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dsc-bone-faint);
}
.dsc-q {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  padding: 15px 12px 15px 10px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--dsc-bone);
  font: inherit;
  font-size: 14.5px;
  letter-spacing: -0.01em;
  text-align: left;
  cursor: pointer;
  transition: background 200ms var(--dsc-ease);
  opacity: 0;
  transform: translateY(6px);
}
.dsc-root.is-open .dsc-q { animation: dsc-rise 520ms var(--dsc-ease) forwards; animation-delay: calc(80ms + var(--i) * 45ms); }
@keyframes dsc-rise { to { opacity: 1; transform: none; } }
.dsc-q + .dsc-q::before {
  content: ""; position: absolute; top: 0; left: 46px; right: 12px; height: 1px; background: var(--dsc-line);
}
.dsc-q-n {
  flex: none;
  width: 22px;
  font-size: 11.5px;
  font-variant-numeric: tabular-nums;
  color: var(--dsc-signal-soft);
  letter-spacing: 0.04em;
}
.dsc-q-t { flex: 1; }
.dsc-q-a {
  flex: none;
  align-self: center;
  color: var(--dsc-bone-faint);
  transition: transform 220ms var(--dsc-ease), color 220ms;
}
.dsc-q:hover, .dsc-q:focus-visible { background: rgba(241, 236, 224, 0.05); outline: none; }
.dsc-q:hover .dsc-q-a, .dsc-q:focus-visible .dsc-q-a { transform: translateX(3px); color: var(--dsc-bone); }
.dsc-q:focus-visible { box-shadow: inset 0 0 0 1px var(--dsc-signal); }

/* conversation */
.dsc-chat { display: none; padding: 20px 20px 12px; }
.dsc-root.is-chat .dsc-chat { display: block; }
.dsc-msg { margin: 0 0 18px; animation: dsc-rise 420ms var(--dsc-ease) both; opacity: 0; transform: translateY(6px); }
.dsc-msg--user { display: flex; justify-content: flex-end; }
.dsc-msg--user .dsc-bubble {
  max-width: 82%;
  padding: 10px 14px;
  border-radius: 16px 16px 4px 16px;
  background: var(--dsc-bone);
  color: #0F1B2D;
  font-size: 14px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.dsc-msg--bot { display: flex; gap: 12px; }
.dsc-msg--bot .dsc-orb { margin-top: 2px; }
.dsc-answer { flex: 1; min-width: 0; font-size: 14.5px; line-height: 1.6; color: rgba(241, 236, 224, 0.92); overflow-wrap: anywhere; }
.dsc-answer p { margin: 0 0 10px; }
.dsc-answer p:last-child { margin-bottom: 0; }
.dsc-answer strong { color: var(--dsc-bone); font-weight: 600; }
.dsc-answer a { color: var(--dsc-signal-soft); text-decoration: underline; text-decoration-color: rgba(141,182,234,0.4); text-underline-offset: 3px; }
.dsc-answer a:hover { text-decoration-color: currentColor; }
.dsc-tiers { list-style: none; margin: 4px 0 12px; padding: 0; border-top: 1px solid var(--dsc-line); }
.dsc-tiers li { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid var(--dsc-line); }
.dsc-tiers .k { font-size: 12.5px; color: var(--dsc-bone-dim); }
.dsc-tiers .v { font-size: 15px; font-weight: 600; color: var(--dsc-bone); font-variant-numeric: tabular-nums; text-align: right; grid-row: span 2; align-self: center; }
.dsc-tiers .d { font-size: 13px; color: rgba(241,236,224,0.8); }
.dsc-word { opacity: 0; animation: dsc-word 260ms ease forwards; }
@keyframes dsc-word { to { opacity: 1; } }

.dsc-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dsc-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600; letter-spacing: -0.005em;
  text-decoration: none !important;
  cursor: pointer;
  transition: transform 160ms var(--dsc-ease), background 160ms, border-color 160ms;
}
.dsc-btn:hover { transform: translateY(-1px); }
.dsc-btn:focus-visible { outline: 2px solid var(--dsc-signal); outline-offset: 2px; }
.dsc-btn--primary { background: var(--dsc-bone); color: #0F1B2D !important; border: 1px solid var(--dsc-bone); }
.dsc-btn--ghost { background: transparent; color: var(--dsc-bone) !important; border: 1px solid var(--dsc-line-2); }
.dsc-btn--ghost:hover { border-color: rgba(241,236,224,0.35); }
.dsc-source { display: block; margin-top: 10px; font-size: 11.5px; color: var(--dsc-bone-faint); letter-spacing: 0.02em; }
.dsc-source a { color: var(--dsc-bone-dim); }

.dsc-typing { display: inline-flex; gap: 5px; padding: 8px 0; }
.dsc-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--dsc-bone-dim); animation: dsc-dot 1s infinite ease-in-out; }
.dsc-typing span:nth-child(2) { animation-delay: 0.15s; }
.dsc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes dsc-dot { 0%, 80%, 100% { opacity: 0.25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.dsc-more { margin: 4px 0 6px; }
.dsc-more .dsc-eyebrow { margin: 8px 0 8px; }
.dsc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.dsc-chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--dsc-line-2);
  background: rgba(241, 236, 224, 0.03);
  color: rgba(241, 236, 224, 0.85);
  font: inherit; font-size: 12.5px;
  cursor: pointer;
  transition: background 160ms, border-color 160ms;
}
.dsc-chip:hover { background: rgba(241, 236, 224, 0.08); border-color: rgba(241,236,224,0.3); }
.dsc-chip:focus-visible { outline: 2px solid var(--dsc-signal); outline-offset: 2px; }

/* composer */
.dsc-compose {
  position: relative;
  padding: 14px 16px 16px;
  border-top: 1px solid var(--dsc-line);
  background: linear-gradient(180deg, rgba(10,19,34,0), rgba(10,19,34,0.6));
}
.dsc-field {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 6px 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--dsc-line-2);
  background: rgba(241, 236, 224, 0.04);
  transition: border-color 160ms, box-shadow 160ms;
}
.dsc-field:focus-within { border-color: rgba(141, 182, 234, 0.6); box-shadow: 0 0 0 4px rgba(74, 138, 216, 0.15); }
.dsc-input {
  flex: 1; min-width: 0;
  border: 0; outline: 0; background: transparent;
  color: var(--dsc-bone);
  font: inherit; font-size: 16px; /* 16px stops iOS zoom-on-focus */
  padding: 6px 0;
}
.dsc-input::placeholder { color: var(--dsc-bone-faint); }
.dsc-send {
  flex: none;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0; border-radius: 50%;
  background: var(--dsc-bone); color: #0F1B2D;
  cursor: pointer;
  transition: transform 160ms var(--dsc-ease), opacity 160ms;
}
.dsc-send:disabled { opacity: 0.35; cursor: default; }
.dsc-send:not(:disabled):hover { transform: scale(1.06); }
.dsc-send:focus-visible { outline: 2px solid var(--dsc-signal); outline-offset: 2px; }
.dsc-send svg { width: 16px; height: 16px; }

/* David card, closes the index view */
.dsc-david {
  display: flex; align-items: center; gap: 12px;
  margin: 22px 6px 0;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--dsc-line);
  background: rgba(241, 236, 224, 0.03);
}
.dsc-david img {
  flex: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover; object-position: 50% 18%;
  border: 1px solid var(--dsc-line-2);
}
.dsc-david-txt { flex: 1; min-width: 0; font-size: 12px; line-height: 1.35; color: var(--dsc-bone-dim); }
.dsc-david-txt b { display: block; color: var(--dsc-bone); font-weight: 600; font-size: 12.5px; }
.dsc-david-links { display: flex; gap: 6px; }
.dsc-david-links a {
  display: grid; place-items: center;
  height: 32px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--dsc-line-2);
  color: var(--dsc-bone);
  font-size: 12px; font-weight: 600;
  text-decoration: none;
  transition: background 160ms, border-color 160ms;
}
.dsc-david-links a:hover { background: rgba(241,236,224,0.08); border-color: rgba(241,236,224,0.3); }
.dsc-david-links a:focus-visible { outline: 2px solid var(--dsc-signal); outline-offset: 2px; }

.dsc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- phone: bottom sheet ---------- */
@media (max-width: 560px) {
  .dsc-launcher { right: 16px; bottom: calc(16px + var(--dsc-lift) + env(safe-area-inset-bottom)); padding: 7px 16px 7px 7px; gap: 10px; }
  .dsc-launcher-s { display: none; }
  .dsc-launcher-t { font-size: 13.5px; }
  .dsc-whisper { right: 16px; bottom: calc(76px + var(--dsc-lift) + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
  .dsc-panel {
    right: 0; left: 0; bottom: 0;
    width: auto;
    z-index: 10001;
    height: min(88dvh, 720px);
    border-radius: 24px 24px 0 0;
    border-bottom: 0;
    transform: translateY(100%);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .dsc-root.is-open .dsc-panel { transform: none; }
  .dsc-head::before {
    content: ""; position: absolute; top: 7px; left: 50%; width: 36px; height: 4px; margin-left: -18px;
    border-radius: 2px; background: rgba(241,236,224,0.2);
  }
  .dsc-hello-h { font-size: 22px; }
  .dsc-head { gap: 10px; padding: 22px 14px 16px 16px; }
  .dsc-head .dsc-orb--lg { width: 32px; height: 32px; }
  .dsc-title { font-size: 15px; }
  .dsc-lang button { min-width: 30px; padding: 0 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .dsc-orb, .dsc-orb::before, .dsc-launcher::after { animation: none !important; }
  .dsc-q, .dsc-msg, .dsc-word { animation: none !important; opacity: 1 !important; transform: none !important; }
  .dsc-panel, .dsc-launcher, .dsc-whisper { transition-duration: 0s !important; }
}

@media print { .dsc-root { display: none !important; } }
