/* LUREVANA 4.15.0 — professional chat, connection intentions and mobile safety UI */
:root {
  --e4150-ink: #171529;
  --e4150-muted: #6d7185;
  --e4150-surface: #ffffff;
  --e4150-soft: #f5f1ff;
  --e4150-line: rgba(91, 71, 170, .16);
  --e4150-accent: #7050ed;
  --e4150-accent-2: #d72db3;
  --e4150-danger: #b72f45;
  --e4150-ok: #16775d;
  --e4150-shadow: 0 14px 38px rgba(31, 24, 67, .12);
}
html { max-width: 100%; overflow-x: clip; }
body { max-width: 100%; overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }
img, video, canvas, svg { max-width: 100%; }

/* Chat pages are enhanced only when JS recognises a real chat surface. */
body.elorami-chat-pro {
  background: linear-gradient(180deg, #fbfaff 0%, #f4f2fb 100%);
  overscroll-behavior-x: none;
}
body.elorami-chat-pro main,
body.elorami-chat-pro .page,
body.elorami-chat-pro .container,
body.elorami-chat-pro .content {
  min-width: 0;
}
.elorami-chat-shell {
  width: min(100%, 760px);
  min-height: min(78dvh, 900px);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  background: var(--e4150-surface);
  border: 1px solid var(--e4150-line);
  border-radius: 28px;
  overflow: clip;
  box-shadow: var(--e4150-shadow);
}
.elorami-chat-pro [data-messages],
.elorami-chat-pro .chat-messages,
.elorami-chat-pro .conversation-messages,
.elorami-chat-pro #messages,
.elorami-chat-pro .messages-list {
  min-height: 42dvh;
  padding: 20px clamp(12px, 3vw, 24px) 120px;
  scroll-padding-bottom: 120px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background:
    radial-gradient(circle at 15% 5%, rgba(112,80,237,.08), transparent 30%),
    linear-gradient(180deg, #fcfbff 0%, #f7f5fc 100%);
}
.elorami-chat-pro .message,
.elorami-chat-pro [data-message],
.elorami-chat-pro .chat-message,
.elorami-chat-pro .message-row {
  position: relative;
  max-width: min(78%, 520px);
  margin: 5px 0;
  padding: 11px 14px;
  border-radius: 19px 19px 19px 7px;
  background: #fff;
  border: 1px solid rgba(34, 27, 66, .08);
  box-shadow: 0 5px 16px rgba(31, 24, 67, .06);
  color: var(--e4150-ink);
  overflow-wrap: anywhere;
  line-height: 1.42;
}
.elorami-chat-pro .message.mine,
.elorami-chat-pro .message.outgoing,
.elorami-chat-pro [data-message][data-own="1"],
.elorami-chat-pro [data-message][data-mine="true"],
.elorami-chat-pro .chat-message--mine {
  margin-left: auto;
  border-radius: 19px 19px 7px 19px;
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--e4150-accent), var(--e4150-accent-2));
}
.elorami-chat-pro .message time,
.elorami-chat-pro [data-message] time,
.elorami-chat-pro .message-meta,
.elorami-chat-pro .message-status {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  margin-left: 7px;
  font-size: .72rem;
  opacity: .68;
  white-space: nowrap;
}
.e4150-date-separator {
  width: max-content;
  max-width: 90%;
  margin: 18px auto 10px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.88);
  border: 1px solid var(--e4150-line);
  color: var(--e4150-muted);
  font-size: .76rem;
  font-weight: 800;
  box-shadow: 0 4px 14px rgba(31,24,67,.05);
}
.e4150-chat-tools {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  overflow-x: auto;
  scrollbar-width: none;
}
.e4150-chat-tools::-webkit-scrollbar { display: none; }
.e4150-tool,
.e4150-chip,
.e4150-intent-option {
  appearance: none;
  border: 1px solid var(--e4150-line);
  background: #fff;
  color: var(--e4150-ink);
  font: inherit;
  font-weight: 800;
  border-radius: 999px;
  min-height: 42px;
  padding: 9px 13px;
  cursor: pointer;
  touch-action: manipulation;
}
.e4150-tool:focus-visible,
.e4150-chip:focus-visible,
.e4150-intent-option:focus-visible {
  outline: 3px solid rgba(112,80,237,.24);
  outline-offset: 2px;
}
.e4150-tool:hover,
.e4150-intent-option:hover { background: var(--e4150-soft); }
.e4150-tool--danger { color: var(--e4150-danger); }

.elorami-chat-pro form[data-chat-composer],
.elorami-chat-pro form.chat-form,
.elorami-chat-pro form.message-form,
.elorami-chat-pro form[action*="message"],
.elorami-chat-pro .chat-composer {
  position: sticky;
  z-index: 20;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: end;
  width: 100%;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--e4150-line);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(18px) saturate(1.15);
}
.elorami-chat-pro form[data-chat-composer] textarea,
.elorami-chat-pro form.chat-form textarea,
.elorami-chat-pro form.message-form textarea,
.elorami-chat-pro form[action*="message"] textarea,
.elorami-chat-pro .chat-composer textarea,
.elorami-chat-pro .chat-composer [contenteditable="true"] {
  width: 100%;
  min-height: 46px;
  max-height: 148px;
  resize: none;
  overflow-y: auto;
  border: 1px solid rgba(44,35,82,.16);
  border-radius: 23px;
  background: #f7f6fb;
  color: var(--e4150-ink);
  padding: 12px 15px;
  font: inherit;
  line-height: 1.35;
}
.elorami-chat-pro form[data-chat-composer] button[type="submit"],
.elorami-chat-pro form.chat-form button[type="submit"],
.elorami-chat-pro form.message-form button[type="submit"],
.elorami-chat-pro form[action*="message"] button[type="submit"],
.elorami-chat-pro .chat-composer button[type="submit"] {
  width: 48px;
  height: 48px;
  min-width: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, var(--e4150-accent), var(--e4150-accent-2));
  color: #fff;
  box-shadow: 0 9px 21px rgba(112,80,237,.28);
  font-size: 0;
}
.elorami-chat-pro form[data-chat-composer] button[type="submit"]::after,
.elorami-chat-pro form.chat-form button[type="submit"]::after,
.elorami-chat-pro form.message-form button[type="submit"]::after,
.elorami-chat-pro form[action*="message"] button[type="submit"]::after,
.elorami-chat-pro .chat-composer button[type="submit"]::after {
  content: "➤";
  font-size: 1.14rem;
  transform: translateX(1px);
}
.elorami-chat-pro button[type="submit"]:disabled { opacity: .42; box-shadow: none; }
.e4150-char-counter {
  grid-column: 1 / -1;
  min-height: 0;
  margin: -4px 14px 0;
  color: var(--e4150-muted);
  text-align: right;
  font-size: .72rem;
}
.e4150-scroll-bottom {
  position: fixed;
  z-index: 25;
  right: max(16px, calc((100vw - 760px) / 2 + 16px));
  bottom: calc(84px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  border: 1px solid var(--e4150-line);
  border-radius: 50%;
  background: #fff;
  color: var(--e4150-ink);
  box-shadow: var(--e4150-shadow);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.e4150-scroll-bottom[hidden] { display: none !important; }
.e4150-offline-note,
.e4150-safety-note {
  margin: 10px auto;
  width: min(calc(100% - 24px), 720px);
  padding: 10px 13px;
  border-radius: 15px;
  background: #fff8e7;
  border: 1px solid #ead6a0;
  color: #594711;
  font-size: .86rem;
}
.e4150-empty-chat {
  max-width: 390px;
  margin: min(15dvh, 100px) auto 22px;
  padding: 22px;
  text-align: center;
  color: var(--e4150-muted);
}
.e4150-empty-chat strong { display:block; color:var(--e4150-ink); font-size:1.2rem; margin-bottom:8px; }

/* Conversation list */
body.elorami-chat-pro .conversation,
body.elorami-chat-pro .chat-preview,
body.elorami-chat-pro [data-conversation] {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0,1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 0;
  padding: 13px 14px;
  border-radius: 20px;
  border: 1px solid transparent;
  background: #fff;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
body.elorami-chat-pro .conversation:hover,
body.elorami-chat-pro .chat-preview:hover,
body.elorami-chat-pro [data-conversation]:hover {
  transform: translateY(-1px);
  border-color: var(--e4150-line);
  box-shadow: 0 9px 24px rgba(31,24,67,.08);
}
body.elorami-chat-pro .conversation * { min-width: 0; }
body.elorami-chat-pro .conversation-name,
body.elorami-chat-pro .chat-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:900; }
body.elorami-chat-pro .conversation-preview,
body.elorami-chat-pro .last-message { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--e4150-muted); }
body.elorami-chat-pro .unread,
body.elorami-chat-pro [data-unread] {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  display:inline-grid;
  place-items:center;
  color:#fff;
  background:var(--e4150-accent);
  font-weight:900;
  font-size:.72rem;
}
.e4150-inbox-search {
  width: 100%;
  margin: 8px 0 14px;
  padding: 12px 15px 12px 42px;
  border: 1px solid var(--e4150-line);
  border-radius: 18px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236d7185' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") no-repeat 15px center;
  font: inherit;
}

/* Bottom sheet / modal */
.e4150-overlay {
  position: fixed;
  z-index: 10050;
  inset: 0;
  display: grid;
  align-items: end;
  background: rgba(18,15,36,.52);
  backdrop-filter: blur(5px);
  padding: 12px;
}
.e4150-overlay[hidden] { display: none !important; }
.e4150-sheet {
  width: min(100%, 620px);
  max-height: min(82dvh, 760px);
  margin-inline: auto;
  overflow: auto;
  border-radius: 26px 26px 18px 18px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(17,12,43,.32);
  padding: 19px;
}
.e4150-sheet__head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
.e4150-sheet__head h2 { margin:0; font-size:1.18rem; }
.e4150-sheet__close { width:42px; height:42px; border-radius:50%; border:1px solid var(--e4150-line); background:#fff; font-size:1.2rem; }
.e4150-sheet__list { display:grid; gap:9px; }
.e4150-starter { width:100%; text-align:left; border:1px solid var(--e4150-line); border-radius:17px; background:#faf9ff; padding:13px 14px; color:var(--e4150-ink); font:inherit; cursor:pointer; }
.e4150-field { display:grid; gap:6px; margin:11px 0; }
.e4150-field label { font-weight:900; }
.e4150-field select, .e4150-field textarea, .e4150-field input { width:100%; min-height:46px; border:1px solid var(--e4150-line); border-radius:15px; padding:11px 12px; background:#fff; color:var(--e4150-ink); font:inherit; }
.e4150-primary { min-height:48px; border:0; border-radius:16px; padding:11px 17px; background:linear-gradient(135deg,var(--e4150-accent),var(--e4150-accent-2)); color:#fff; font:inherit; font-weight:900; cursor:pointer; }
.e4150-secondary { min-height:46px; border:1px solid var(--e4150-line); border-radius:16px; padding:10px 15px; background:#fff; color:var(--e4150-ink); font:inherit; font-weight:850; cursor:pointer; }
.e4150-status { min-height:22px; margin-top:8px; color:var(--e4150-muted); font-size:.84rem; }
.e4150-status.is-error { color:var(--e4150-danger); }
.e4150-status.is-ok { color:var(--e4150-ok); }

/* Connection intentions */
.e4150-intents-card {
  width: min(100%, 760px);
  margin: 18px auto;
  padding: clamp(17px, 4vw, 26px);
  border: 1px solid var(--e4150-line);
  border-radius: 25px;
  background: linear-gradient(145deg,#fff 0%,#faf8ff 100%);
  box-shadow: 0 12px 34px rgba(31,24,67,.08);
}
.e4150-intents-card h2 { margin:0 0 6px; color:var(--e4150-ink); font-size:clamp(1.25rem,5vw,1.75rem); }
.e4150-intents-card p { margin:0 0 16px; color:var(--e4150-muted); }
.e4150-intents-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
.e4150-intent-option { min-height:72px; border-radius:18px; text-align:left; display:flex; flex-direction:column; align-items:flex-start; justify-content:center; white-space:normal; }
.e4150-intent-option strong { font-size:.96rem; }
.e4150-intent-option small { color:var(--e4150-muted); font-weight:650; margin-top:3px; line-height:1.25; }
.e4150-intent-option.is-selected { color:#fff; border-color:transparent; background:linear-gradient(135deg,var(--e4150-accent),var(--e4150-accent-2)); box-shadow:0 9px 22px rgba(112,80,237,.22); }
.e4150-intent-option.is-selected small { color:rgba(255,255,255,.84); }
.e4150-sensitive-consent { display:none; margin:14px 0; padding:12px 13px; border-radius:16px; background:#fff8ee; border:1px solid #ead5ad; color:#4f3c12; }
.e4150-sensitive-consent.is-visible { display:block; }
.e4150-sensitive-consent label { display:flex; align-items:flex-start; gap:9px; font-size:.86rem; }
.e4150-sensitive-consent input { margin-top:3px; }
.e4150-intents-actions { display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:14px; }
.e4150-public-intents { display:flex; flex-wrap:wrap; gap:7px; margin:8px 0; }
.e4150-public-intents .e4150-chip { min-height:32px; padding:5px 10px; font-size:.78rem; background:var(--e4150-soft); }

.e4150-legal-note { margin-top:14px; padding-top:12px; border-top:1px solid var(--e4150-line); color:var(--e4150-muted); font-size:.78rem; line-height:1.42; }
.e4150-legal-note a { color:var(--e4150-accent); font-weight:800; }

@media (max-width: 640px) {
  .elorami-chat-shell { border-radius: 0; border-inline:0; min-height:calc(100dvh - 70px); }
  .e4150-intents-grid { grid-template-columns:1fr; }
  .e4150-intent-option { min-height:62px; }
  .e4150-sheet { padding:16px; }
  .elorami-chat-pro .message,
  .elorami-chat-pro [data-message],
  .elorami-chat-pro .chat-message,
  .elorami-chat-pro .message-row { max-width:86%; }
}
@media (prefers-color-scheme: dark) {
  body.elorami-chat-pro { background:#11101a; }
  .elorami-chat-shell,
  .e4150-sheet,
  .e4150-intents-card,
  body.elorami-chat-pro .conversation,
  body.elorami-chat-pro .chat-preview,
  body.elorami-chat-pro [data-conversation] { background:#1b1928; color:#f5f2ff; border-color:rgba(255,255,255,.10); }
  .elorami-chat-pro [data-messages], .elorami-chat-pro .chat-messages, .elorami-chat-pro .conversation-messages, .elorami-chat-pro #messages, .elorami-chat-pro .messages-list { background:#14131e; }
  .elorami-chat-pro .message, .elorami-chat-pro [data-message], .elorami-chat-pro .chat-message, .elorami-chat-pro .message-row { background:#252234; color:#f7f5ff; border-color:rgba(255,255,255,.08); }
  .e4150-tool, .e4150-chip, .e4150-intent-option, .e4150-starter, .e4150-secondary, .e4150-field select, .e4150-field textarea, .e4150-field input { background:#252234; color:#f7f5ff; border-color:rgba(255,255,255,.12); }
  .e4150-intents-card h2, .e4150-sheet__head h2 { color:#f7f5ff; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior:auto !important; transition:none !important; animation:none !important; }
}
