/* ─── Yameveo Advisor Widget ─────────────────────────────────────────────── */

#ym-advisor-root,
#ym-advisor-root * {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Launcher button ───────────────────────────────────────────────────── */

#ym-advisor-root .ym-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9000;
  height: 48px;
  padding: 0 18px 0 14px;
  border-radius: 24px;
  background: #0D0F14;
  border: 1.5px solid rgba(196, 136, 58, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 4px 20px rgba(196, 136, 58, 0.3), 0 2px 8px rgba(0,0,0,0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

#ym-advisor-root .ym-launcher-label {
  font-size: 13.5px;
  font-weight: 600;
  color: #C4883A;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

#ym-advisor-root .ym-launcher:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 28px rgba(196, 136, 58, 0.5), 0 2px 8px rgba(0,0,0,0.5);
}

#ym-advisor-root .ym-launcher:focus-visible {
  outline: 2px solid rgba(196, 136, 58, 0.8);
  outline-offset: 3px;
}

#ym-advisor-root .ym-launcher svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* ─── Chat panel ────────────────────────────────────────────────────────── */

#ym-advisor-root .ym-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 9001;
  width: 380px;
  max-height: 540px;
  background: #0D0F14;
  border: 1px solid rgba(196, 136, 58, 0.28);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7), 0 0 0 1px rgba(196,136,58,0.08);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#ym-advisor-root .ym-panel.ym-panel--open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

/* ─── Header ────────────────────────────────────────────────────────────── */

#ym-advisor-root .ym-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 13px;
  background: #111318;
  border-bottom: 1px solid rgba(196, 136, 58, 0.2);
  flex-shrink: 0;
}

#ym-advisor-root .ym-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

#ym-advisor-root .ym-header-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #C4883A 0%, #8B5E20 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #0D0F14;
  flex-shrink: 0;
}

#ym-advisor-root .ym-header-title {
  font-size: 14px;
  font-weight: 600;
  color: #E8EDF5;
  letter-spacing: -0.2px;
}

#ym-advisor-root .ym-header-sub {
  font-size: 11px;
  color: rgba(196, 136, 58, 0.8);
  margin-top: 1px;
}

#ym-advisor-root .ym-close {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255,255,255,0.35);
  font-size: 20px;
  line-height: 1;
  padding: 2px 4px;
  border-radius: 4px;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

#ym-advisor-root .ym-close:hover {
  color: rgba(255,255,255,0.7);
}

/* ─── Messages ──────────────────────────────────────────────────────────── */

#ym-advisor-root .ym-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}

#ym-advisor-root .ym-messages::-webkit-scrollbar {
  width: 4px;
}
#ym-advisor-root .ym-messages::-webkit-scrollbar-track {
  background: transparent;
}
#ym-advisor-root .ym-messages::-webkit-scrollbar-thumb {
  background: rgba(196, 136, 58, 0.25);
  border-radius: 2px;
}

/* ─── Message bubbles ───────────────────────────────────────────────────── */

#ym-advisor-root .ym-msg {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.55;
  word-break: break-word;
}

#ym-advisor-root .ym-msg--user {
  align-self: flex-end;
  background: rgba(196, 136, 58, 0.18);
  border: 1px solid rgba(196, 136, 58, 0.35);
  color: #E8EDF5;
  border-bottom-right-radius: 3px;
}

#ym-advisor-root .ym-msg--assistant {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #C8D4E0;
  border-bottom-left-radius: 3px;
}

#ym-advisor-root .ym-msg--error {
  align-self: flex-start;
  background: rgba(180, 50, 50, 0.15);
  border: 1px solid rgba(180, 50, 50, 0.3);
  color: #F5A0A0;
  font-size: 12.5px;
  border-radius: 8px;
}

/* ─── Typing indicator ──────────────────────────────────────────────────── */

#ym-advisor-root .ym-msg--typing {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 3px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 5px;
}

#ym-advisor-root .ym-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #C4883A;
  animation: ym-pulse 1.2s ease-in-out infinite;
}

#ym-advisor-root .ym-dot:nth-child(2) { animation-delay: 0.2s; }
#ym-advisor-root .ym-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes ym-pulse {
  0%, 80%, 100% { opacity: 0.25; transform: scale(0.85); }
  40%            { opacity: 1;    transform: scale(1.1); }
}

/* ─── Booking CTA card ──────────────────────────────────────────────────── */

#ym-advisor-root .ym-cta-card {
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(196, 136, 58, 0.07);
  border: 1px solid rgba(196, 136, 58, 0.4);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#ym-advisor-root .ym-cta-card-text {
  font-size: 12.5px;
  color: rgba(200, 212, 224, 0.9);
  line-height: 1.4;
}

#ym-advisor-root .ym-cta-card-text strong {
  color: #E8EDF5;
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

#ym-advisor-root .ym-cta-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: #C4883A;
  color: #0D0F14;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.15s, transform 0.15s;
  white-space: nowrap;
}

#ym-advisor-root .ym-cta-btn:hover {
  background: #D49A4A;
  transform: translateY(-1px);
}

/* ─── Input row ─────────────────────────────────────────────────────────── */

#ym-advisor-root .ym-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(196, 136, 58, 0.15);
  background: #111318;
  flex-shrink: 0;
}

#ym-advisor-root .ym-input {
  flex: 1;
  resize: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(196, 136, 58, 0.2);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: #E8EDF5;
  min-height: 38px;
  max-height: 110px;
  overflow-y: auto;
  line-height: 1.45;
  transition: border-color 0.15s;
  outline: none;
}

#ym-advisor-root .ym-input::placeholder {
  color: rgba(200, 212, 224, 0.3);
}

#ym-advisor-root .ym-input:focus {
  border-color: rgba(196, 136, 58, 0.55);
  background: rgba(255,255,255,0.07);
}

#ym-advisor-root .ym-send {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  background: #C4883A;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
  outline: none;
}

#ym-advisor-root .ym-send:hover:not(:disabled) {
  background: #D49A4A;
  transform: scale(1.05);
}

#ym-advisor-root .ym-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

#ym-advisor-root .ym-send svg {
  width: 16px;
  height: 16px;
}

/* ─── Footer ────────────────────────────────────────────────────────────── */

#ym-advisor-root .ym-footer {
  padding: 5px 12px 8px;
  text-align: center;
  font-size: 10.5px;
  color: rgba(200, 212, 224, 0.25);
  background: #111318;
  border-top: 1px solid rgba(255,255,255,0.04);
  flex-shrink: 0;
}

#ym-advisor-root .ym-footer a {
  color: inherit;
  text-decoration: none;
}

/* ─── Mobile ─────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
  #ym-advisor-root .ym-panel {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 78px;
    max-height: 75vh;
  }
  #ym-advisor-root .ym-launcher {
    bottom: 16px;
    right: 10px;
    padding: 0 14px 0 12px;
  }
}
