/* ai-finder.css — محرّك البدائل الذكي (ودجت عائم) */
.aif-fab{ position:fixed; inset-block-end:20px; inset-inline-end:20px; z-index:980;
  display:flex; align-items:center; gap:8px; padding:12px 18px; border:0; border-radius:999px; cursor:pointer;
  background:linear-gradient(135deg,#6d8bff,#a855f7); color:#fff; font-weight:800; font-size:14px;
  box-shadow:0 8px 26px rgba(109,139,255,.45); transition:transform .15s; }
.aif-fab:active{ transform:scale(.95); }
.aif-fab__icon{ font-size:18px; }
@media(max-width:560px){ .aif-fab__txt{ display:none; } .aif-fab{ padding:14px; } }

.aif-panel{ position:fixed; inset:0; z-index:990; display:none; }
.aif-panel[aria-hidden="false"]{ display:block; }
.aif-panel__backdrop{ position:absolute; inset:0; background:rgba(2,4,15,.66); backdrop-filter:blur(4px); }
.aif-panel__card{ position:absolute; inset:auto 0 0 0; margin:0 auto; width:min(560px,100%); max-height:90vh;
  background:#11152e; color:#e9edff; border:1px solid rgba(255,255,255,.1); border-radius:20px 20px 0 0;
  display:flex; flex-direction:column; animation:aifUp .22s ease; }
@keyframes aifUp{ from{ transform:translateY(40px); opacity:0 } to{ transform:translateY(0); opacity:1 } }
@media(min-width:600px){
  .aif-panel__card{ inset:50% auto auto 50%; transform:translate(-50%,-50%); border-radius:20px; }
  @keyframes aifUp{ from{opacity:0} to{opacity:1} }
}
.aif-panel__head{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
  padding:16px 18px; border-bottom:1px solid rgba(255,255,255,.1); }
.aif-panel__title{ font-size:17px; font-weight:900; }
.aif-panel__sub{ font-size:12px; color:#9aa3c7; margin-top:4px; }
.aif-x{ border:0; background:rgba(255,255,255,.08); color:#e9edff; width:34px; height:34px; border-radius:10px; font-size:16px; cursor:pointer; flex:0 0 auto; }

.aif-search{ display:flex; gap:8px; padding:14px 18px 8px; }
.aif-search input{ flex:1; min-width:0; background:#0e1330; color:#e9edff; border:1px solid rgba(255,255,255,.12);
  border-radius:12px; padding:12px 14px; font-size:14px; }
.aif-mic{ width:46px; flex:0 0 auto; border:1px solid rgba(255,255,255,.12); background:#0e1330; color:#e9edff;
  border-radius:12px; font-size:18px; cursor:pointer; }
.aif-mic.is-on{ background:rgba(239,68,68,.2); border-color:rgba(239,68,68,.5); animation:aifPulse 1s infinite; }
@keyframes aifPulse{ 50%{ box-shadow:0 0 0 6px rgba(239,68,68,.15) } }
.aif-go{ flex:0 0 auto; border:0; background:linear-gradient(135deg,#6d8bff,#a855f7); color:#fff;
  font-weight:800; font-size:14px; padding:0 18px; border-radius:12px; cursor:pointer; }
.aif-go:disabled{ opacity:.6; cursor:wait; }

.aif-examples{ display:flex; align-items:center; gap:6px; flex-wrap:wrap; padding:4px 18px 12px; font-size:12px; color:#9aa3c7; }
.aif-examples button{ border:1px solid rgba(109,139,255,.35); background:rgba(109,139,255,.1); color:#bcd0ff;
  font-size:12px; font-weight:700; padding:5px 11px; border-radius:999px; cursor:pointer; }

.aif-body{ padding:8px 18px 18px; overflow-y:auto; flex:1; }
.aif-hint{ text-align:center; color:#9aa3c7; padding:30px 10px; font-size:13.5px; }
.aif-hint--err{ color:#fca5a5; }
.aif-interp{ background:rgba(109,139,255,.1); border:1px solid rgba(109,139,255,.25); color:#cdd9ff;
  padding:10px 13px; border-radius:12px; font-size:13px; margin-bottom:10px; }
.aif-sec{ font-size:13px; font-weight:900; color:#9aa3c7; margin:14px 2px 8px; }

.aif-card{ background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.1); border-radius:14px; padding:12px 13px; margin-bottom:9px; }
.aif-card--alt{ border-color:rgba(168,85,247,.3); background:rgba(168,85,247,.06); }
.aif-card__top{ display:flex; align-items:center; justify-content:space-between; gap:8px; }
.aif-card__model{ font-size:16px; font-weight:900; word-break:break-word; }
.aif-conf{ flex:0 0 auto; font-size:12px; font-weight:900; padding:3px 10px; border-radius:999px;
  background:rgba(168,85,247,.18); color:#d8b4fe; }
.aif-conf--ok{ background:rgba(16,185,129,.16); color:#34d399; }
.aif-card__brand{ font-size:12px; color:#9aa3c7; margin-top:3px; }
.aif-card__specs{ font-size:12.5px; color:#cdd9ff; margin-top:7px; line-height:1.6; }
.aif-card__reason{ font-size:12.5px; color:#a7f3d0; margin-top:5px; line-height:1.6; }
.aif-card__whs{ display:flex; flex-wrap:wrap; gap:6px; margin-top:9px; }
.aif-wh{ font-size:11.5px; font-weight:700; color:#cbd5e1; background:rgba(255,255,255,.06);
  border:1px solid rgba(255,255,255,.08); padding:3px 9px; border-radius:8px; }

.aif-loading{ display:flex; align-items:center; justify-content:center; gap:10px; padding:34px 10px; color:#9aa3c7; font-size:13.5px; }
.aif-spinner{ width:18px; height:18px; border:2.5px solid rgba(255,255,255,.2); border-top-color:#a855f7; border-radius:50%; animation:aifSpin .7s linear infinite; }
@keyframes aifSpin{ to{ transform:rotate(360deg) } }

/* ===== الثيم الفاتح ===== */
:root[data-theme="light"] .aif-panel__card{ background:#ffffff; color:#0b0d23; }
:root[data-theme="light"] .aif-search input,
:root[data-theme="light"] .aif-mic{ background:#f1f5ff; color:#0b0d23; }
:root[data-theme="light"] .aif-panel__sub,
:root[data-theme="light"] .aif-hint,
:root[data-theme="light"] .aif-card__brand{ color:#475569; }
:root[data-theme="light"] .aif-card{ background:#eaf1ff; border-color:rgba(37,99,235,.15); }
:root[data-theme="light"] .aif-card--alt{ background:#f0eaff; }
:root[data-theme="light"] .aif-wh{ background:#eef3ff; color:#334155; border-color:rgba(37,99,235,.12); }
:root[data-theme="light"] .aif-x{ background:rgba(15,23,42,.06); color:#0b0d23; }
