/* Zweyna AI Chatbot - Gold Theme */
:root{
  --zw-gold: #D4AF37;
  --zw-panel: #121212;
  --zw-border: rgba(212,175,55,.25);
  --zw-muted: rgba(255,255,255,.82);
}

/* Launcher */
.zweyna-launcher{
  position: fixed;
  z-index: 99998;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1a1a1a, #0d0d0d);
  border: 1px solid var(--zw-border);
  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  cursor: pointer;
  direction: rtl;
}
.zweyna-launcher-dot{
  width: 42px; height: 42px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 30%, #ffe9a6, var(--zw-gold));
  box-shadow: 0 10px 22px rgba(212,175,55,.35);
  position: relative;
}
.zweyna-launcher-dot:after{
  content: "💬";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.zweyna-launcher-label{
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

/* Window */
.zweyna-window{
  position: fixed;
  z-index: 99999;
  display: none;
  direction: rtl;
}
.zweyna-window.open{ display: block; }

.zweyna-container{
  width: 360px;
  max-width: 100%;
  background: var(--zw-panel);
  border: 1px solid var(--zw-border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.35);
  font-family: system-ui, -apple-system, "Segoe UI", Tahoma, Arial, sans-serif;
}

/* Header */
.zweyna-header{
  background: linear-gradient(90deg, rgba(212,175,55,.9), rgba(212,175,55,.55));
  color: #121212;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.zweyna-title{ font-size: 16px; font-weight: 900; }
.zweyna-subtitle{ font-size: 12.5px; opacity: .95; }
.zweyna-header-controls{ display: flex; align-items: center; gap: 8px; }
.zweyna-hbtn{
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.12);
  background: rgba(255,255,255,.25);
  color: #111;
  font-weight: 900;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.zweyna-hbtn:hover{ background: rgba(255,255,255,.35); }

/* Messages */
.zweyna-messages{
  background: #0f0f0f;
  padding: 10px;
  max-height: 380px;
  overflow-y: auto;
}
.zweyna-msg{ display: flex; align-items: flex-start; gap: 10px; margin: 0 0 10px 0; }
.zweyna-msg .ava{
  width: 28px; height: 28px;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: #fff; flex: 0 0 auto;
}
.zweyna-msg .txt{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  border-radius: 12px;
  padding: 10px 10px;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  max-width: 100%;
}
.zweyna-msg.user{ flex-direction: row-reverse; }
.zweyna-msg.user .txt{
  background: rgba(212,175,55,.14);
  border-color: rgba(212,175,55,.25);
}

/* Input */
.zweyna-input{
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: #0f0f0f;
}
#zweyna-input{
  flex: 1;
  min-width: 0;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
}
#zweyna-input::placeholder{ color: rgba(255,255,255,.55); }
.zweyna-send{
  width: 44px; height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(212,175,55,.35);
  background: var(--zw-gold);
  color: #121212;
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

/* Prechat */
.zweyna-prechat-overlay{
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: rgba(0,0,0,.55);
  display: flex;
  align-items: center;
  justify-content: center;
  direction: rtl;
}
.zweyna-prechat-modal{
  width: min(440px, 92vw);
  background: #111;
  border: 1px solid var(--zw-border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,.45);
  color: #fff;
}
.zweyna-prechat-modal h3{ margin: 0 0 6px 0; font-size: 18px; font-weight: 900; color: var(--zw-gold); }
.zweyna-prechat-modal p{ margin: 0 0 12px 0; font-size: 13px; color: var(--zw-muted); }
#zweyna-prechat-form label{ display:block; margin: 8px 0 6px; font-size: 13px; color: #fff; }
#zweyna-prechat-form .req{ color: var(--zw-gold); margin-right: 4px; font-weight: 900; }
#zweyna-prechat-form input{
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 10px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.zweyna-pre-actions{ display:flex; gap:10px; margin-top: 14px; }
.zweyna-pre-start{
  border: 1px solid rgba(212,175,55,.35);
  background: var(--zw-gold);
  color: #121212;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 900;
  cursor: pointer;
}
.zweyna-pre-cancel{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}
.zweyna-pre-error{ margin-top: 10px; color: #ffb4b4; font-size: 12.5px; }

/* Mobile center */
@media (max-width: 768px){
  #zweyna-chatbot-window{
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 95% !important;
    max-width: 430px !important;
    bottom: 100px !important;
  }
  .zweyna-container{ width: 100% !important; }
  .zweyna-messages{ max-height: calc(80vh - 132px) !important; }
}
