/* ============================================================
   المساعد الذكي للاجتماعات - Custom Styles
   Deep Navy + Teal | RTL | Dark Mode
   ============================================================ */

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Cairo', sans-serif;
  background-color: #080d1a;
  color: #e2e8f0;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(20,184,166,.10) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 100% 80%, rgba(13,148,136,.07) 0%, transparent 60%);
}

/* ── Typography ── */
h1, h2, h3, .font-display {
  font-family: 'Tajawal', sans-serif;
}

/* ── Glass Card ── */
.glass-card {
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.08);
}

.glass-card-hover {
  background: rgba(255,255,255,.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,.08);
  transition: background 0.2s, border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.glass-card-hover:hover {
  background: rgba(20,184,166,.08);
  border-color: rgba(20,184,166,.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(20,184,166,.12);
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, #2dd4bf 0%, #14b8a6 50%, #0d9488 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Teal Button ── */
.btn-teal {
  background: linear-gradient(135deg, #14b8a6, #0d9488);
  color: #fff;
  font-family: 'Cairo', sans-serif;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(20,184,166,.25);
}
.btn-teal:hover { opacity: .9; box-shadow: 0 6px 24px rgba(20,184,166,.35); }
.btn-teal:active { transform: scale(.97); }

/* ── Ghost Button ── */
.btn-ghost {
  background: transparent;
  color: #94a3b8;
  font-family: 'Cairo', sans-serif;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 20px;
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s;
}
.btn-ghost:hover {
  color: #e2e8f0;
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.06);
}

/* ── Loading Spinner ── */
.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(20,184,166,.2);
  border-top-color: #14b8a6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Waveform Bars ── */
.waveform-bar {
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(to top, #0d9488, #2dd4bf);
  transform-origin: bottom center;
}

.waveform-bar.active {
  animation: wave 1.2s ease-in-out infinite;
}
.waveform-bar:nth-child(1)  { animation-delay: 0.0s; }
.waveform-bar:nth-child(2)  { animation-delay: 0.1s; }
.waveform-bar:nth-child(3)  { animation-delay: 0.2s; }
.waveform-bar:nth-child(4)  { animation-delay: 0.3s; }
.waveform-bar:nth-child(5)  { animation-delay: 0.4s; }
.waveform-bar:nth-child(6)  { animation-delay: 0.3s; }
.waveform-bar:nth-child(7)  { animation-delay: 0.2s; }
.waveform-bar:nth-child(8)  { animation-delay: 0.1s; }
.waveform-bar:nth-child(9)  { animation-delay: 0.0s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.3); }
  50%       { transform: scaleY(1.4); }
}

/* ── Mic Pulse ── */
.mic-recording {
  animation: micPulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(239,68,68,.5);
}

@keyframes micPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
  70%  { box-shadow: 0 0 0 18px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ── Progress Bar ── */
.progress-bar-track {
  background: rgba(255,255,255,.08);
  border-radius: 9999px;
  overflow: hidden;
  height: 6px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #0d9488, #2dd4bf);
  border-radius: 9999px;
  transition: width 0.4s ease;
}

/* ── Drag-and-Drop Zone ── */
.drop-zone {
  border: 2px dashed rgba(20,184,166,.3);
  border-radius: 16px;
  transition: border-color .2s, background .2s;
}
.drop-zone.drag-over,
.drop-zone:hover {
  border-color: rgba(20,184,166,.7);
  background: rgba(20,184,166,.06);
}

/* ── Status Badge ── */
.badge {
  font-family: 'Cairo', sans-serif;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 9999px;
}
.badge-pending    { background: rgba(234,179,8,.15);   color: #fbbf24; }
.badge-in_progress{ background: rgba(59,130,246,.15);  color: #60a5fa; }
.badge-done       { background: rgba(34,197,94,.15);   color: #4ade80; }

/* ── Tab Navigation ── */
.tab-btn {
  font-family: 'Cairo', sans-serif;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  transition: color .2s, background .2s;
  white-space: nowrap;
}
.tab-btn.active {
  background: rgba(20,184,166,.15);
  color: #2dd4bf;
}
.tab-btn:hover:not(.active) {
  color: #94a3b8;
  background: rgba(255,255,255,.05);
}

/* ── Processing Steps ── */
.step-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: #475569;
  transition: color .3s;
}
.step-item.active   { color: #2dd4bf; }
.step-item.done     { color: #4ade80; }

.step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color .3s, background .3s;
}
.step-item.done .step-icon {
  background: rgba(34,197,94,.15);
}

/* ── Search Input ── */
.search-input {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  color: #e2e8f0;
  font-family: 'Cairo', sans-serif;
  padding: 10px 16px 10px 40px;
  width: 100%;
  outline: none;
  transition: border-color .2s, background .2s;
}
.search-input:focus {
  border-color: rgba(20,184,166,.5);
  background: rgba(20,184,166,.05);
}
.search-input::placeholder { color: #475569; }

/* ── Toast ── */
.toast {
  pointer-events: auto;
  font-family: 'Cairo', sans-serif;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 18px;
  border-radius: 12px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid;
  animation: toastIn .3s ease forwards;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}
.toast-success { background: rgba(34,197,94,.15);  border-color: rgba(34,197,94,.3);  color: #4ade80; }
.toast-error   { background: rgba(239,68,68,.15);  border-color: rgba(239,68,68,.3);  color: #f87171; }
.toast-info    { background: rgba(20,184,166,.15);  border-color: rgba(20,184,166,.3);  color: #2dd4bf; }
.toast-out     { animation: toastOut .3s ease forwards; }

@keyframes toastIn  { from { opacity:0; transform: translateY(-12px); } to { opacity:1; transform: translateY(0); } }
@keyframes toastOut { from { opacity:1; transform: translateY(0); } to { opacity:0; transform: translateY(-12px); } }

/* ── Transcript text ── */
.transcript-text {
  font-family: 'Cairo', sans-serif;
  font-size: 15px;
  line-height: 2;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: rgba(255,255,255,.12); border-radius: 9999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(20,184,166,.4); }

/* ── Animations ── */
.animate-fade-in  { animation: fadeIn  0.35s ease forwards; }
.animate-slide-up { animation: slideUp 0.35s ease forwards; }

@keyframes fadeIn  { from { opacity:0; }                           to { opacity:1; }          }
@keyframes slideUp { from { opacity:0; transform:translateY(20px);} to { opacity:1; transform:translateY(0);} }

/* ── Mobile responsive ── */
@media (max-width: 640px) {
  .search-input { font-size: 16px; } /* prevents iOS zoom */
}

/* ── Divider ── */
.divider {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 0;
}

/* ── Empty State ── */
.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: rgba(20,184,166,.08);
  border: 1px solid rgba(20,184,166,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
