/* danielsolves.ai — contact booking chat styles.
   Extracted from the previous inline <style> in index.html so the chat widget
   ships as one css + one js pair. Loaded after styles/site.css. */

  /* Booking form */
  .field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  @media (max-width: 540px) { .field-row { grid-template-columns: 1fr; gap: 0; } }
  .field input[type="datetime-local"] { color-scheme: light dark; font-family: var(--sans); }
  .slots-block { margin-bottom: 26px; padding: 22px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-sunken); }
  .slots-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; }
  .slots-head label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
  .slots-tz { font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 0.02em; }
  .slots-tz.detected { color: var(--accent-2); }
  .slot-cards { display: flex; flex-direction: column; gap: 10px; }
  .slot-loading { font-family: var(--mono); font-size: 12px; color: var(--faint); padding: 16px; text-align: center; }
  .slot-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 18px; border: 1px solid var(--line-input); border-radius: var(--r-control); background: var(--surface-sunken); cursor: pointer; transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease; user-select: none; }
  .slot-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
  .slot-card.selected { border-color: var(--accent); background: oklch(from var(--accent) l c h / 0.08); box-shadow: 0 0 0 2px oklch(from var(--accent) l c h / 0.18); }
  .slot-card.selected .slot-pick { color: var(--accent); }
  .slot-when { display: flex; flex-direction: column; gap: 4px; }
  .slot-berlin { font-size: 15px; color: var(--text); font-weight: 500; }
  .slot-berlin .slot-day { color: var(--accent); font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin-right: 8px; }
  .slot-local { font-family: var(--mono); font-size: 11.5px; color: var(--faint); }
  .slot-pick { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; flex: none; }
  .slots-custom-toggle { background: none; border: none; color: var(--muted); font-family: var(--mono); font-size: 12px; padding: 12px 4px 0; cursor: pointer; text-align: left; transition: color 0.18s; }
  .slots-custom-toggle:hover { color: var(--accent); }
  .slot-custom { margin-top: 12px; padding: 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-control); }
  .slot-custom input[type="datetime-local"] { width: 100%; background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; color: var(--text); font-family: var(--sans); font-size: 14px; color-scheme: light dark; }
  .slot-custom input:focus { outline: none; border-color: var(--accent); }
  .slot-custom-back { background: none; border: none; color: var(--muted); font-family: var(--mono); font-size: 11.5px; padding: 8px 0 0; cursor: pointer; }
  .slot-custom-back:hover { color: var(--accent); }
  .slot-custom-note { font-family: var(--mono); font-size: 11px; color: var(--faint); margin-top: 6px; }
  .form-note { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-top: 16px; text-align: center; line-height: 1.55; }
  .form-note.success { color: var(--accent-2); }
  .form-note.error { color: var(--danger); }

  /* Chat form */
  .chat-form {
    display: flex; flex-direction: column;
    min-height: 520px; max-height: 720px;
    background: var(--surface-sunken);
    border: 1px solid var(--line);
    border-radius: var(--r-card);
    overflow: hidden;
    backdrop-filter: blur(10px);
  }
  .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex; flex-direction: column; gap: 14px;
    scroll-behavior: smooth;
  }
  @media (max-width: 640px) {
    /* Sits inside the halved page gutter; 24px on both sides was too much here. */
    .chat-messages { padding: 18px 16px; }
  }
  .chat-messages::-webkit-scrollbar { width: 6px; }
  .chat-messages::-webkit-scrollbar-track { background: transparent; }
  .chat-messages::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 3px; }

  .chat-msg { display: flex; gap: 10px; max-width: 88%; animation: chatFadeIn 280ms ease-out; align-items: flex-end; }
  .chat-msg.bot { align-self: flex-start; }
  .chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }

  .chat-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-2) 70%, oklch(0.18 0.02 260) 120%);
    box-shadow: 0 0 14px var(--glow);
    flex: none;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--mono); font-size: 11px; font-weight: 600;
    color: var(--on-accent);
    letter-spacing: 0.02em;
  }

  .chat-bubble {
    padding: 12px 16px; border-radius: 16px;
    font-size: 15px; line-height: 1.5;
    word-wrap: break-word; max-width: 100%;
  }
  .chat-msg.bot .chat-bubble {
    background: var(--surface-2);
    border: 1px solid var(--line);
    color: var(--text);
    border-bottom-left-radius: 4px;
  }
  .chat-msg.user .chat-bubble {
    background: oklch(from var(--accent) l c h / 0.14);
    border: 1px solid oklch(from var(--accent) l c h / 0.3);
    color: var(--text);
    border-bottom-right-radius: 4px;
    font-weight: 500;
  }
  .chat-bubble b { color: var(--accent); font-weight: 600; }

  .chat-typing { display: flex; gap: 5px; padding: 14px 18px !important; align-items: center; }
  .chat-typing span {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--muted);
    animation: chatTypingBounce 1.4s infinite ease-in-out both;
  }
  .chat-typing span:nth-child(2) { animation-delay: 0.16s; }
  .chat-typing span:nth-child(3) { animation-delay: 0.32s; }

  @keyframes chatFadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
  @keyframes chatTypingBounce {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.7); }
    40% { opacity: 1; transform: scale(1); }
  }

  .chat-input {
    display: flex; flex-direction: column; gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid var(--line);
    background: var(--surface-sunken);
    flex-shrink: 0;
  }
  .chat-input [hidden], .chat-form [hidden] { display: none !important; }
  /* The send control sits in this row, not on a line of its own, so the field
     and its action read as one composer. align-items: flex-end keeps the button
     on the bottom edge when the textarea grows. */
  .chat-input-row { display: flex; gap: 10px; align-items: flex-end; }
  .chat-input input, .chat-input textarea {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--surface-sunken);
    border: 1px solid var(--line-input);
    border-radius: 10px;
    padding: 12px 14px;
    color: var(--text);
    font-family: var(--sans); font-size: 15px;
    transition: border-color 0.18s, box-shadow 0.18s;
  }
  .chat-input input:focus, .chat-input textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--glow);
  }
  .chat-input textarea { resize: vertical; min-height: 90px; font-family: var(--sans); }

  .chat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .chat-chip {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: transparent;
    color: var(--text);
    font-family: var(--mono); font-size: 12.5px;
    cursor: pointer;
    transition: border-color 0.18s, color 0.18s, background 0.18s;
  }
  .chat-chip:hover { border-color: var(--accent); color: var(--accent); }
  .chat-chip.selected {
    background: oklch(from var(--accent) l c h / 0.15);
    border-color: var(--accent); color: var(--accent);
  }

  .chat-actions { display: flex; gap: 10px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
  .chat-actions:empty { display: none; }
  .chat-submit {
    background: var(--accent); color: var(--on-accent);
    border: none; border-radius: var(--r-pill);
    padding: 11px 22px;
    font-family: var(--mono); font-size: 13px; font-weight: 600;
    cursor: pointer; transition: box-shadow 0.2s, transform 0.2s, opacity 0.2s;
    display: inline-flex; align-items: center; gap: 8px;
  }
  .chat-submit:hover:not(:disabled) { box-shadow: 0 0 22px var(--glow); transform: translateY(-1px); }
  .chat-submit:disabled { opacity: 0.5; cursor: not-allowed; }

  /* Icon-only twin of .chat-submit, sized to match the input's height so the
     two line up exactly. The accessible name comes from aria-label. */
  .chat-send {
    flex: 0 0 auto;
    width: 46px; height: 46px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--accent); color: var(--on-accent);
    border: none; border-radius: 12px;
    cursor: pointer;
    transition: box-shadow 0.2s, transform 0.2s, opacity 0.2s;
  }
  .chat-send svg { width: 19px; height: 19px; display: block; }
  .chat-send:hover:not(:disabled) { box-shadow: 0 0 22px var(--glow); transform: translateY(-1px); }
  .chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
  .chat-skip {
    background: none; border: none;
    color: var(--faint); font-family: var(--mono); font-size: 13px;
    cursor: pointer; padding: 6px 10px;
    transition: color 0.18s;
  }
  .chat-skip:hover { color: var(--text); }
  .chat-reset {
    background: none; border: 1px solid var(--line);
    color: var(--muted); font-family: var(--mono); font-size: 12px;
    padding: 8px 14px; border-radius: var(--r-pill); cursor: pointer;
    transition: border-color 0.18s, color 0.18s;
  }
  .chat-reset:hover { border-color: var(--text); color: var(--text); }

  .chat-error { font-family: var(--mono); font-size: 12px; color: var(--danger); margin-top: -4px; }
  .chat-hint { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin-top: -4px; line-height: 1.5; }

  .chat-slots { display: flex; flex-direction: column; gap: 10px; }
  .chat-slots .slot-card { background: var(--surface); }
  .chat-tz { font-family: var(--mono); font-size: 11px; color: var(--faint); }
  .chat-tz.detected { color: var(--accent-2); }
  .chat-slot-custom-toggle {
    background: none; border: none;
    color: var(--muted); font-family: var(--mono); font-size: 12px;
    padding: 6px 0; cursor: pointer; text-align: left;
    transition: color 0.18s;
  }
  .chat-slot-custom-toggle:hover { color: var(--accent); }
  .chat-slot-custom { padding: 12px; border: 1px dashed var(--line-strong); border-radius: 10px; display: flex; flex-direction: column; gap: 8px; }
  .chat-slot-custom input[type="datetime-local"] {
    background: var(--surface-sunken);
    border: 1px solid var(--line); border-radius: 8px;
    padding: 10px 12px; color: var(--text); color-scheme: light dark;
    font-family: var(--sans); font-size: 14px;
  }
  .chat-slot-custom input:focus { outline: none; border-color: var(--accent); }
  .chat-slot-custom .chat-skip { align-self: flex-start; padding: 4px 0; }

  .chat-summary {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 18px;
    margin-top: 4px;
    display: flex; flex-direction: column; gap: 8px;
  }
  .chat-summary-row { display: flex; gap: 14px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
  .chat-summary-row:last-child { border-bottom: none; }
  .chat-summary-label {
    font-family: var(--mono); font-size: 11px; color: var(--faint);
    letter-spacing: 0.06em; text-transform: uppercase;
    flex: none; min-width: 78px;
  }
  .chat-summary-value { font-size: 14px; color: var(--text); flex: 1; word-break: break-word; }

  .chat-call-overlay {
    padding: 12px 14px;
    background: oklch(from var(--accent) l c h / 0.10);
    border: 1px dashed oklch(from var(--accent) l c h / 0.5);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    text-align: center;
    font-family: var(--mono);
  }
  .chat-input[data-call-paused="1"] input,
  .chat-input[data-call-paused="1"] textarea,
  .chat-input[data-call-paused="1"] button {
    opacity: 0.45;
    cursor: not-allowed;
  }
  .chat-bubble.chat-call-paused {
    background: oklch(from var(--accent) l c h / 0.10) !important;
    border-color: oklch(from var(--accent) l c h / 0.30) !important;
    font-style: italic;
  }

  @media (max-width: 820px) {
    .chat-form { max-height: none; min-height: 480px; }
    .chat-messages { padding: 18px; }
    .chat-input { padding: 14px 16px; }
    .chat-msg { max-width: 92%; }
  }


/* The chat had no reduced-motion handling at all. */
@media (prefers-reduced-motion: reduce) {
  .chat-messages { scroll-behavior: auto; }
  .chat-msg { animation: none; }
  .chat-typing span { animation: none; opacity: 0.6; }
}
