/* Ästhetikoase Chatbot Widget v3.0 – Apple-clean */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

#oase-chatbot *, #oase-chatbot *::before, #oase-chatbot *::after { box-sizing: border-box; margin: 0; padding: 0; }
#oase-chatbot { font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }

/* ── FAB ─────────────────────────────────────── */
.oase-fab {
  position: fixed; bottom: 20px; right: 20px;
  width: 60px; height: 60px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(145deg, #BFA37A, #8C6D42);
  box-shadow: 0 4px 16px rgba(140,109,66,0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 99998;
}
.oase-fab:hover { transform: scale(1.06); box-shadow: 0 6px 24px rgba(140,109,66,0.45); }
.oase-fab svg { width: 28px; height: 28px; fill: #fff; transition: opacity 0.2s, transform 0.2s; }
.oase-fab .oase-fab-close { position: absolute; opacity: 0; transform: rotate(-90deg) scale(0.5); }
.oase-fab.is-open .oase-fab-open { opacity: 0; transform: rotate(90deg) scale(0.5); }
.oase-fab.is-open .oase-fab-close { opacity: 1; transform: rotate(0) scale(1); }

/* ── Window ──────────────────────────────────── */
.oase-window {
  position: fixed; bottom: 92px; right: 20px;
  width: 400px; max-width: calc(100vw - 24px);
  height: 620px; max-height: calc(100vh - 110px);
  background: #F6F3EE; border-radius: 20px;
  box-shadow: 0 12px 48px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.04);
  display: flex; flex-direction: column; overflow: hidden;
  z-index: 99999;
  opacity: 0; transform: translateY(16px) scale(0.96); pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.oase-window.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

/* ── Header ──────────────────────────────────── */
.oase-header {
  padding: 20px 22px; display: flex; align-items: center; gap: 14px;
  background: linear-gradient(145deg, #BFA37A, #8C6D42);
  flex-shrink: 0; position: relative;
}
.oase-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.18);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  margin-right: 14px;
}
.oase-avatar span { color: #fff; font-size: 18px; }
.oase-header-text h3 { font-size: 17px; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
.oase-header-text p { font-size: 13px; color: rgba(255,255,255,0.65); margin-top: 3px; }
.oase-header-close {
  position: absolute; top: 16px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.12); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.oase-header-close:hover { background: rgba(255,255,255,0.22); }
.oase-header-close svg { width: 14px; height: 14px; stroke: #fff; stroke-width: 2.5; fill: none; }

/* ── Messages ────────────────────────────────── */
.oase-messages { flex: 1; overflow-y: auto; padding: 24px 20px 16px; scroll-behavior: smooth; }
.oase-messages::-webkit-scrollbar { width: 4px; }
.oase-messages::-webkit-scrollbar-thumb { background: #D4C5B0; border-radius: 4px; }

.oase-msg { display: flex; align-items: flex-end; margin-bottom: 20px; animation: oase-msgIn 0.35s cubic-bezier(0.16,1,0.3,1); }
@keyframes oase-msgIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.oase-msg.is-user { justify-content: flex-end; padding-left: 52px; }
.oase-msg.is-bot { justify-content: flex-start; padding-right: 40px; }

.oase-msg-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(145deg, #BFA37A, #8C6D42);
  display: flex; align-items: center; justify-content: center;
  margin-right: 10px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(140,109,66,0.2);
}
.oase-msg-avatar span { color: #fff; font-size: 11px; font-weight: 700; }
.oase-msg.is-user .oase-msg-avatar { display: none; }

.oase-bubble {
  max-width: 100%; padding: 14px 18px;
  font-size: 15px; line-height: 1.6; letter-spacing: -0.01em;
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: break-word;
}
.oase-msg.is-bot .oase-bubble {
  background: #fff; color: #3A2E22;
  border-radius: 20px 20px 20px 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.oase-msg.is-user .oase-bubble {
  background: linear-gradient(145deg, #BFA37A, #8C6D42); color: #fff;
  border-radius: 20px 20px 6px 20px;
  box-shadow: 0 2px 12px rgba(140,109,66,0.2);
}

/* ── Typing ───────────────────────────────────── */
.oase-typing { display: flex; align-items: center; gap: 6px; padding: 6px 2px; }
.oase-typing span { width: 8px; height: 8px; border-radius: 50%; background: #C4A882; animation: oase-dot 1.4s infinite ease-in-out; }
.oase-typing span:nth-child(2) { animation-delay: 0.16s; }
.oase-typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes oase-dot { 0%,80%,100% { transform: translateY(0); } 40% { transform: translateY(-6px); } }

/* ── Welcome ─────────────────────────────────── */
.oase-welcome { flex: 1; overflow-y: auto; padding: 24px 20px 16px; }
.oase-welcome-bubble {
  display: flex; align-items: flex-end; gap: 10px; margin-bottom: 28px;
  animation: oase-msgIn 0.4s cubic-bezier(0.16,1,0.3,1);
}
.oase-welcome-bubble .oase-bubble { padding: 16px 20px; }
.oase-welcome-cards { display: flex; flex-direction: column; gap: 10px; padding-left: 42px; }
.oase-welcome-btn {
  display: flex; align-items: center; gap: 12;
  padding: 16px 20px; border-radius: 16px;
  border: 1px solid #E8DFD3; background: #fff;
  cursor: pointer; font-size: 15px; font-weight: 500;
  color: #5A4632; text-align: left;
  font-family: 'DM Sans', sans-serif;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: all 0.2s ease;
  animation: oase-msgIn 0.4s cubic-bezier(0.16,1,0.3,1);
}
.oase-welcome-btn:nth-child(1) { animation-delay: 0.05s; }
.oase-welcome-btn:nth-child(2) { animation-delay: 0.1s; }
.oase-welcome-btn:nth-child(3) { animation-delay: 0.15s; }
.oase-welcome-btn:nth-child(4) { animation-delay: 0.2s; }
.oase-welcome-btn:hover {
  background: #FAF7F2; border-color: #BFA37A;
  transform: translateY(-1px);
  box-shadow: 0 3px 12px rgba(0,0,0,0.06);
}
.oase-welcome-btn .oase-welcome-emoji { font-size: 20px; flex-shrink: 0; }

/* ── Input ────────────────────────────────────── */
.oase-input-bar { padding: 12px 20px 16px; background: #F6F3EE; flex-shrink: 0; }
.oase-input-row {
  display: flex; align-items: center; gap: 10;
  background: #fff; border-radius: 28px;
  padding: 6px 6px 6px 20px;
  border: 1px solid #E8DFD3;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.oase-input-row:focus-within { border-color: #BFA37A; box-shadow: 0 0 0 3px rgba(191,163,122,0.12); }
.oase-input-row input {
  flex: 1; min-width: 0; border: none; background: transparent; outline: none;
  font-family: 'DM Sans', sans-serif; font-size: 15px; color: #3A2E22;
  letter-spacing: -0.01em;
}
.oase-input-row input::placeholder { color: #B5A898; }
.oase-send-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none;
  background: #E8DFD3; cursor: default;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease; flex-shrink: 0;
}
.oase-send-btn.is-active { background: linear-gradient(145deg, #BFA37A, #8C6D42); cursor: pointer; }
.oase-send-btn.is-active:hover { transform: scale(1.06); }
.oase-send-btn svg { width: 18px; height: 18px; stroke: #fff; fill: none; }

/* ── Footer ───────────────────────────────────── */
.oase-footer { text-align: center; padding: 0 20px 12px; font-size: 11px; color: #B5A898; line-height: 1.4; background: #F6F3EE; }
.oase-footer a { color: #8C6D42; text-decoration: none; font-weight: 500; }
.oase-footer a:hover { text-decoration: underline; }

/* ── Mobile ──────────────────────────────────── */
@media (max-width: 440px) {
  .oase-window { bottom: 0; right: 0; left: 0; width: 100%; height: 100%; max-height: 100%; max-width: 100%; border-radius: 0; }
  .oase-fab { bottom: 16px; right: 16px; }
  .oase-header { padding: 20px 22px; padding-top: max(20px, env(safe-area-inset-top)); }
  .oase-messages, .oase-welcome { padding: 20px 16px 12px; }
  .oase-msg.is-user { padding-left: 40px; }
  .oase-msg.is-bot { padding-right: 28px; }
  .oase-welcome-cards { padding-left: 36px; }
  .oase-welcome-btn { padding: 14px 16px; font-size: 14px; }
  .oase-input-bar { padding: 10px 16px 14px; padding-bottom: max(14px, env(safe-area-inset-bottom)); }
  .oase-footer { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}
