/**
 * Zebridge Bot — Floating Chat Widget Styles
 * Premium light theme: white surfaces, #151515 ink, #FFB716 gold accents.
 * Rounded corners, soft shadows, smooth transitions.
 *
 * NOTE: the host page (lang-switcher.css) enforces `* { border-radius: 0 !important }`,
 * so every rounded radius here is declared with !important to survive that reset.
 * Colors are literal hex (the panel is appended to <body>, outside any theme scope).
 */

/* ==========================================
   Floating Trigger Button
   ========================================== */
.zb-bot-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99998;
  width: 56px;
  height: 56px;
  background: #FFB716;
  border: none;
  border-radius: 50% !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 183, 22, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.25s ease;
}

.zb-bot-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(255, 183, 22, 0.6);
}

.zb-bot-btn--hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.6);
}

/* ==========================================
   Chat Panel
   ========================================== */
.zb-bot-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  width: 380px;
  height: 520px;
  max-height: calc(100vh - 48px);
  background: #FFFFFF;
  border: 1px solid #E7E9EE;
  border-radius: 18px !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  box-shadow: 0 12px 40px rgba(21, 21, 21, 0.16), 0 2px 8px rgba(21, 21, 21, 0.08);
}

.zb-bot-panel--open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ==========================================
   Header
   ========================================== */
.zb-bot-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #FFFFFF;
  border-bottom: 1px solid #E7E9EE;
  flex-shrink: 0;
  position: relative;
}

.zb-bot-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(90deg, #FFB716 0%, #E89A1B 100%);
}

.zb-bot-header__logo {
  width: 36px;
  height: 36px;
  background: #FFFFFF;
  border: 2px solid #FFB716;
  border-radius: 50% !important;
  object-fit: contain;
  padding: 2px;
  box-shadow: 0 2px 8px rgba(255, 183, 22, 0.35);
  flex-shrink: 0;
}

.zb-bot-header__title {
  font-family: 'Oswald', sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #151515;
  flex: 1;
}

.zb-bot-header__lang {
  font-size: 11px;
  font-weight: 600;
  color: #8A5A00;
  background: #FFF6E0;
  border: 1px solid #FFD97A;
  padding: 3px 9px;
  border-radius: 999px !important;
  letter-spacing: 0.5px;
}

.zb-bot-header__close {
  background: none;
  border: none;
  color: #151515;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 6px;
  opacity: 0.55;
  transition: opacity 0.15s, color 0.15s;
}

.zb-bot-header__close:hover {
  opacity: 1;
  color: #E89A1B;
}

/* ==========================================
   Messages Area
   ========================================== */
.zb-bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
  background: #FBFBFC;
}

.zb-bot-messages::-webkit-scrollbar {
  width: 5px;
}

.zb-bot-messages::-webkit-scrollbar-track {
  background: #F1F2F4;
}

.zb-bot-messages::-webkit-scrollbar-thumb {
  background: #D1D5DB;
  border-radius: 3px !important;
}

.zb-bot-messages::-webkit-scrollbar-thumb:hover {
  background: #FFB716;
}

/* Message rows */
.zb-bot-msg {
  display: flex;
  max-width: 85%;
}

.zb-bot-msg--user {
  align-self: flex-end;
}

.zb-bot-msg--bot {
  align-self: flex-start;
}

.zb-bot-msg--anim {
  animation: zbBotFadeIn 0.25s ease;
}

@keyframes zbBotFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Bubbles */
.zb-bot-msg--user .zb-bot-bubble {
  background: #FFB716;
  color: #151515;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  border-radius: 16px !important;
  border-bottom-right-radius: 4px !important;
  box-shadow: 0 2px 10px rgba(255, 183, 22, 0.3);
}

.zb-bot-msg--bot .zb-bot-bubble {
  background: #FFFFFF;
  color: #151515;
  padding: 10px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  border: 1px solid #E7E9EE;
  border-left: 3px solid #FFB716;
  border-radius: 16px !important;
  border-bottom-left-radius: 4px !important;
  box-shadow: 0 1px 3px rgba(21, 21, 21, 0.08), 0 4px 14px rgba(21, 21, 21, 0.06);
}

.zb-bot-bubble strong {
  font-weight: 700;
  color: #151515;
}

.zb-bot-msg--user .zb-bot-bubble strong {
  color: #151515;
}

.zb-bot-bubble code {
  background: #FFF6E0;
  color: #8A5A00;
  padding: 1px 5px;
  border-radius: 6px !important;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
}

/* ==========================================
   Typing Indicator
   ========================================== */
.zb-bot-typing {
  display: flex;
  gap: 5px;
  padding: 10px 16px;
  align-self: flex-start;
}

.zb-bot-typing span {
  width: 7px;
  height: 7px;
  background: #FFB716;
  border-radius: 50% !important;
  animation: zbBotBounce 1.4s infinite;
}

.zb-bot-typing span:nth-child(2) { animation-delay: 0.2s; }
.zb-bot-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes zbBotBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* ==========================================
   Quick-Action Chips
   ========================================== */
.zb-bot-chips {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 16px 12px;
  background: #FFFFFF;
}

.zb-bot-chip {
  background: #FFFFFF;
  border: 1.5px solid #FFB716;
  color: #151515;
  padding: 6px 14px;
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  border-radius: 999px !important;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(21, 21, 21, 0.06);
  transition: background 0.15s, color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.zb-bot-chip:hover {
  background: #FFB716;
  color: #151515;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 183, 22, 0.35);
}

/* ==========================================
   Input Row
   ========================================== */
.zb-bot-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #E7E9EE;
  background: #FFFFFF;
  flex-shrink: 0;
}

.zb-bot-input {
  flex: 1;
  background: #F7F8FA;
  border: 1.5px solid #E7E9EE;
  color: #151515;
  padding: 10px 14px;
  font-size: 13.5px;
  font-family: 'Montserrat', sans-serif;
  border-radius: 999px !important;
  outline: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.zb-bot-input::placeholder {
  color: #9CA3AF;
}

.zb-bot-input:focus {
  border-color: #FFB716;
  background: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(255, 183, 22, 0.15);
}

.zb-bot-send {
  width: 40px;
  height: 40px;
  background: #FFB716;
  border: none;
  border-radius: 50% !important;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 183, 22, 0.4);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.zb-bot-send:hover {
  background: #E89A1B;
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(255, 183, 22, 0.5);
}

.zb-bot-send:disabled {
  background: #E5E7EB;
  box-shadow: none;
  cursor: not-allowed;
}

/* ==========================================
   Responsive — full-screen on mobile
   ========================================== */
@media (max-width: 480px) {
  .zb-bot-panel {
    bottom: 0;
    right: 0;
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: none;
    border-radius: 0 !important;
  }

  .zb-bot-btn {
    bottom: 16px;
    right: 16px;
  }
}
