/* ═══════════════════════════════════════════
   Zahira — talking site guide (see zahira.js)
   ═══════════════════════════════════════════ */

.zahira { position: fixed; left: 22px; bottom: 22px; z-index: 1500; font-family: var(--f-body); }
.zahira [hidden] { display: none !important; }

/* Avatar: gold monogram in a teal disc, sound rings while speaking */
.z-avatar {
  position: relative; flex-shrink: 0;
  width: 54px; height: 54px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #17605A 0%, #0B2E2D 60%, #051617 100%);
  border: 2px solid var(--c-gold);
  box-shadow: 0 0 0 4px rgba(221,170,69,0.15), 0 10px 26px rgba(0,0,0,0.5);
}
.z-mono {
  font-family: var(--f-accent); font-style: italic; font-weight: 600;
  font-size: 28px; line-height: 1; color: var(--c-gold-hi);
  transform: translateY(-1px);
}
.z-wave {
  position: absolute; inset: -2px; border-radius: 50%;
  border: 2px solid var(--c-teal); opacity: 0; pointer-events: none;
}
.zahira.speaking .z-wave { animation: zWave 1.4s ease-out infinite; }
.zahira.speaking .z-wave + .z-wave { animation-delay: 0.7s; }
@keyframes zWave { from { transform: scale(1); opacity: 0.8; } to { transform: scale(1.7); opacity: 0; } }
/* Zahira's photo sits over the monogram; if the file is missing the img removes itself */
.z-photo {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 50%; object-fit: cover; object-position: center 30%;
}
.z-avatar-sm { width: 40px; height: 40px; }
.z-avatar-sm .z-mono { font-size: 21px; }

/* Launcher */
.z-launcher {
  display: flex; align-items: center; gap: 10px;
  padding: 0 18px 0 0; border-radius: 40px;
  background: rgba(5,22,23,0.88); backdrop-filter: blur(10px);
  border: 1px solid var(--c-gold-soft);
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
  transition: transform 0.25s, border-color 0.25s;
}
.z-launcher:hover { transform: translateY(-3px); border-color: var(--c-gold); }
.z-launcher-name { font-family: var(--f-accent); font-style: italic; font-size: 18px; color: var(--c-gold-hi); }
.zahira.open .z-launcher { display: none; }

/* Greeting teaser */
.z-teaser {
  position: absolute; left: 0; bottom: 70px;
  width: 260px; padding: 16px 18px 14px;
  background: linear-gradient(170deg, #0F3F3B 0%, #0B2E2D 60%, #061B1C 100%);
  border: 1px solid var(--c-teal-soft); border-radius: 14px 14px 14px 4px;
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  animation: zPop 0.5s cubic-bezier(.2,.8,.2,1.2) both;
}
.z-teaser-text { font-size: 14px; line-height: 1.5; color: var(--c-cream); margin: 0 18px 12px 0; }
.z-teaser[dir="rtl"] .z-teaser-text { margin: 0 0 12px 18px; font-family: 'Tajawal', var(--f-body); font-size: 15px; }
.z-teaser-go {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--c-bg); background: var(--c-gold); padding: 8px 14px; border-radius: 4px;
}
.z-teaser-close { position: absolute; top: 6px; right: 10px; font-size: 20px; color: var(--c-text-mute); }
.z-teaser[dir="rtl"] .z-teaser-close { right: auto; left: 10px; }
@keyframes zPop { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }

/* Panel */
.z-panel {
  width: min(380px, calc(100vw - 32px));
  max-height: min(600px, calc(100vh - 110px));
  display: flex; flex-direction: column;
  background: linear-gradient(175deg, #0D3633 0%, #0A2826 45%, #061B1C 100%);
  border: 1px solid rgba(43,196,182,0.3); border-top: 2px solid var(--c-gold);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.6);
  overflow: hidden;
  animation: zPop 0.4s cubic-bezier(.2,.8,.2,1) both;
}
.z-panel[lang="ar"] { font-family: 'Tajawal', var(--f-body); }
.z-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; border-bottom: 1px solid rgba(221,170,69,0.18); }
.z-id { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.z-id strong { font-family: var(--f-accent); font-style: italic; font-size: 20px; color: var(--c-gold-hi); font-weight: 600; }
.z-role { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-teal-hi); }
.z-panel[lang="ar"] .z-role { letter-spacing: 0; font-size: 13px; }
.z-icon {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: var(--c-cream);
  border: 1px solid rgba(255,255,255,0.12); transition: all 0.2s;
}
.z-icon:hover { border-color: var(--c-gold); color: var(--c-gold); }
.z-close { font-size: 22px; font-weight: 400; }
.z-lang { font-family: 'Tajawal', var(--f-body); font-size: 15px; }

.z-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; min-height: 120px; }
.z-msg { max-width: 88%; padding: 11px 14px; font-size: 14px; line-height: 1.55; border-radius: 14px; animation: zPop 0.35s ease both; }
.z-panel[lang="ar"] .z-msg { font-size: 15px; }
.z-bot { align-self: flex-start; background: rgba(43,196,182,0.1); border: 1px solid rgba(43,196,182,0.2); color: var(--c-cream); border-bottom-left-radius: 4px; }
.z-user { align-self: flex-end; background: var(--c-gold); color: var(--c-bg); font-weight: 600; border-bottom-right-radius: 4px; }
.z-panel[dir="rtl"] .z-bot { border-bottom-left-radius: 14px; border-bottom-right-radius: 4px; }
.z-panel[dir="rtl"] .z-user { border-bottom-right-radius: 14px; border-bottom-left-radius: 4px; }
.z-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }

.z-btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 7px 14px; border-radius: 4px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.06em;
  background: var(--c-gold); color: var(--c-bg); transition: all 0.2s;
}
.z-btn:hover { background: var(--c-gold-hi); }
.z-btn:disabled { opacity: 0.35; cursor: default; }
.z-btn.z-ghost { background: none; color: var(--c-text-soft); border: 1px solid rgba(255,255,255,0.18); }
.z-btn.z-wa { background: #25D366; color: #06231a; }

.z-tourbar { display: flex; align-items: center; gap: 8px; padding: 10px 16px; border-top: 1px solid rgba(221,170,69,0.18); }
.z-step { flex: 1; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--c-gold); }
.z-panel[lang="ar"] .z-step { letter-spacing: 0; font-size: 13px; }

.z-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.z-chip {
  padding: 7px 13px; border-radius: 20px;
  font-size: 12.5px; font-weight: 600; color: var(--c-teal-hi);
  border: 1px solid var(--c-teal-soft); background: rgba(43,196,182,0.06);
  transition: all 0.2s;
}
.z-chip:hover { background: var(--c-teal); color: var(--c-bg); border-color: var(--c-teal); }
.z-chip:first-child { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-bg); }

.z-form { display: flex; gap: 8px; padding: 12px 14px 14px; border-top: 1px solid rgba(255,255,255,0.06); }
.z-input {
  flex: 1; min-width: 0; padding: 10px 14px; border-radius: 22px;
  background: rgba(5,22,23,0.7); border: 1px solid rgba(43,196,182,0.25);
  color: #fff; font: inherit; font-size: 14px; outline: none;
}
.z-input:focus { border-color: var(--c-teal); }
.z-send { padding: 0 16px; border-radius: 22px; background: var(--c-teal); color: var(--c-bg); font-weight: 700; font-size: 13px; }

.zahira.touring .z-log { max-height: 230px; }

/* Spotlight on the section Zahira is presenting */
.z-spot { box-shadow: inset 0 0 0 2px rgba(221,170,69,0.55), inset 0 0 120px rgba(221,170,69,0.08), 0 -22px 44px rgba(0,0,0,0.35) !important; transition: box-shadow 0.6s ease; }

@media (max-width: 768px) {
  .zahira { left: 12px; bottom: 12px; }
  .z-launcher-name { display: none; }
  .z-launcher { padding: 0; }
  .z-panel { max-height: calc(100vh - 90px); }
  .zahira.touring .z-log { max-height: 34vh; }
}
@media (prefers-reduced-motion: reduce) {
  .zahira.speaking .z-wave, .z-teaser, .z-panel, .z-msg { animation: none; }
}
