/* Diseño "Sol" — chat de citas de Spabar.  Tokens: */
:root {
  --navy: #273569; --ink: #0B0F24; --cream: #F7F4EF; --white: #FFFFFF; --surface2: #F1ECE6;
  --rose: #C08C86; --rose-soft: #E4C9C4; --gray: #6B7089; --line: #0B0F2424; --line-soft: #0B0F2412;
  --warn-bg: #F8EFD9; --warn-text: #9A6B10; --online: #1F8C4F;
  --font: 'Manrope', 'Segoe UI', system-ui, sans-serif; --display: 'DM Serif Display', Georgia, serif;
}
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--cream); color: var(--ink); -webkit-font-smoothing: antialiased; }
button { font-family: inherit; }
[hidden] { display: none !important; }
.wc-shell { display: flex; flex-direction: column; height: 100%; height: 100dvh; max-width: 760px; margin: 0 auto; background: var(--cream); }
body:not(.embed) .wc-shell { box-shadow: 0 0 0 1px var(--line-soft); }

/* a) cabecera */
.wc-header { display: flex; align-items: center; gap: 8px; height: 60px; box-sizing: border-box; padding: 10px 4px 10px 12px; background: var(--navy); color: var(--cream); flex: none; position: relative; z-index: 5; }
.wc-avatar-wrap { position: relative; width: 40px; height: 40px; flex: none; }
.wc-logo { width: 40px; height: 40px; border-radius: 50%; display: block; object-fit: cover; }
.wc-online-dot { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; box-sizing: border-box; border-radius: 50%; background: var(--online); border: 2px solid var(--navy); }
.wc-titles { flex: 1; min-width: 0; }
.wc-title { font: 700 15px/1.25 var(--font); color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-subtitle { font: 400 12px/1.3 var(--font); color: #F7F4EFB8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wc-hbtn { width: 40px; height: 40px; display: grid; place-items: center; background: none; border: 0; color: var(--cream); cursor: pointer; border-radius: 50%; padding: 0; }
.wc-hbtn:hover, .wc-hbtn:focus-visible { background: #F7F4EF1F; outline: none; }
.wc-hbtn svg { width: 20px; height: 20px; }
.wc-menu-wrap { position: relative; }
.wc-menu { position: absolute; right: 4px; top: 44px; background: var(--white); border-radius: 12px; box-shadow: 0 8px 28px #0B0F2433; padding: 6px; min-width: 220px; }
.wc-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; font: 600 14px var(--font); color: var(--ink); border-radius: 8px; cursor: pointer; text-align: left; }
.wc-menu button:hover { background: var(--surface2); }
.wc-menu svg { width: 18px; height: 18px; color: var(--gray); }

/* conversación (Deep Chat) */
.wc-main { flex: 1; min-height: 0; position: relative; display: flex; flex-direction: column; }
deep-chat { flex: 1; min-height: 0; }
.wc-status { position: absolute; left: 16px; right: 16px; bottom: 8px; font: italic 12px var(--font); color: var(--gray); pointer-events: none; }
.wc-status.typing::after { content: ''; display: inline-block; width: 1.2em; text-align: left; animation: wc-dots 1.2s steps(4, end) infinite; }
@keyframes wc-dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.wc-status.offline, .wc-status.error { font-style: normal; pointer-events: auto; background: var(--warn-bg); color: var(--warn-text); border-radius: 10px; padding: 8px 12px; line-height: 1.4; box-shadow: 0 1px 2px #0B0F2414; }
.wc-status.error { background: #FBE9E7; color: #8A1C1C; }
/* "Sol está escribiendo…" (burbuja de Sol con 3 puntos; alineada con las burbujas del asistente de Deep Chat) */
.wc-typing { position: absolute; left: 14px; right: 14px; bottom: 8px; display: flex; align-items: flex-end; gap: 8px; pointer-events: none; z-index: 2; }
.wc-typing-av { width: 28px; height: 28px; border-radius: 50%; flex: none; display: block; object-fit: cover; }
.wc-typing-bubble { position: relative; display: flex; align-items: center; gap: 4px; height: 36px; box-sizing: border-box; padding: 0 14px; background: var(--white); border-radius: 0 14px 14px 14px; box-shadow: 0 1px 1px #0B0F2414; }
.wc-typing-bubble::before { content: ''; position: absolute; left: -7px; top: 0; border-style: solid; border-width: 0 8px 8px 0; border-color: transparent var(--white) transparent transparent; }
.wc-typing-bubble i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray); opacity: .35; animation: wc-typing-dot 1.2s infinite ease-in-out; }
.wc-typing-bubble i:nth-child(2) { animation-delay: .15s; } .wc-typing-bubble i:nth-child(3) { animation-delay: .3s; }
@keyframes wc-typing-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }
.wc-typing-label { font: italic 12px/1.2 var(--font); color: var(--gray); padding-bottom: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (prefers-reduced-motion: reduce) { .wc-typing-bubble i { animation: none; opacity: .6; } }

/* adjuntos pendientes (miniaturas antes de enviar) */
.wc-attach-strip { display: flex; gap: 8px; padding: 8px 12px 0; background: var(--white); border-top: 1px solid var(--line-soft); overflow-x: auto; flex: none; }
.wc-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; background: var(--surface2); flex: none; display: grid; place-items: center; color: var(--gray); font: 700 10px var(--font); }
.wc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wc-thumb button { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: #0B0F24B3; color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.wc-thumb button svg { width: 14px; height: 14px; }
.wc-thumb.busy::after { content: ''; position: absolute; inset: 0; background: #fff8; }

/* g) barra de entrada */
.wc-composer { position: relative; display: flex; align-items: center; gap: 6px; min-height: 68px; box-sizing: border-box; padding: 8px; background: var(--white); border-top: 1px solid var(--line-soft); flex: none; }
.wc-attach-strip:not([hidden]) + .wc-composer { border-top: 0; }
.wc-icon-btn { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; background: transparent; color: var(--gray); cursor: pointer; border-radius: 50%; padding: 0; }
.wc-icon-btn svg { width: 22px; height: 22px; }
.wc-icon-btn:hover, .wc-icon-btn[aria-expanded="true"] { background: var(--surface2); }
.wc-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 2px; background: var(--surface2); border-radius: 22px; padding: 0 6px 0 16px; min-height: 44px; box-sizing: border-box; }
.wc-field textarea { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; resize: none; font: 400 14px/20px var(--font); color: var(--ink); padding: 12px 0; max-height: 120px; }
.wc-field textarea::placeholder { color: var(--gray); opacity: 1; }
.wc-field-btn { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; background: transparent; color: var(--gray); cursor: pointer; border-radius: 50%; padding: 0; }
.wc-field-btn svg { width: 20px; height: 20px; }
.wc-field-btn:hover { color: var(--navy); }
@media (hover: hover) and (pointer: fine) { .wc-mobile-only { display: none; } }
.wc-action { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--navy); color: var(--cream); cursor: pointer; padding: 0; transition: transform .1s; }
.wc-action:active { transform: scale(.94); }
.wc-action svg { width: 22px; height: 22px; }
.wc-action[data-mode="send"] svg { width: 20px; height: 20px; margin-left: -2px; }
.wc-action[disabled] { opacity: .5; cursor: default; }
.wc-composer.recording .wc-action { background: #B3261E; }
.wc-rec { flex: 1; display: flex; align-items: center; gap: 8px; background: var(--surface2); border-radius: 22px; padding: 0 16px 0 6px; min-height: 44px; font: 600 14px var(--font); color: var(--ink); }
.wc-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: #B3261E; animation: wc-blink 1s infinite; }
.wc-rec-label { flex: 1; }
.wc-rec-time { font-variant-numeric: tabular-nums; color: var(--gray); }
@keyframes wc-blink { 50% { opacity: .25; } }
.wc-emoji-pop { position: absolute; left: 8px; bottom: 64px; width: min(320px, calc(100% - 16px)); box-sizing: border-box; background: var(--white); border-radius: 14px; box-shadow: 0 8px 28px #0B0F2433; padding: 8px; display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; z-index: 6; }
.wc-emoji-pop button { border: 0; background: none; font-size: 22px; line-height: 1; padding: 6px 0; border-radius: 8px; cursor: pointer; }
.wc-emoji-pop button:hover { background: var(--surface2); }

/* i) pie */
.wc-footer { text-align: center; font: 400 11px var(--font); color: var(--gray); padding: 2px 0 calc(6px + env(safe-area-inset-bottom)); background: var(--white); flex: none; }
.wc-footer:empty { display: none; }
body.embed .wc-shell { box-shadow: none; }
