/* features.css — ميزات إضافية: تثبيت التطبيق، بحث يوتيوب، روابط الضيوف، شعار الدخول */

  /* ── تثبيت التطبيق + نافذة المساعدة ── */
  .install-banner { display:flex; align-items:center; gap:10px; margin:0 0 14px; padding:11px 13px;
    background:linear-gradient(90deg, rgba(250,10,27,.14), rgba(255,91,61,.08));
    border:1px solid var(--border-strong); border-radius:16px; }
  .install-banner .ib-text { flex:1; min-width:0; }
  .install-banner .ib-text b { display:block; font-size:14px; font-weight:800; }
  .install-banner .ib-text small { color:var(--muted); font-size:12px; }
  .ib-btn { border:0; border-radius:12px; padding:9px 16px; font:inherit; font-weight:800; cursor:pointer; color:#fff;
    background:linear-gradient(90deg, var(--accent), var(--accent2)); }
  .ib-x { border:0; background:transparent; color:var(--muted); font-size:22px; line-height:1; cursor:pointer; padding:2px 6px; }
  .modal-overlay { position:fixed; inset:0; z-index:200; background:rgba(0,0,0,.62); display:flex; align-items:flex-end; justify-content:center; padding:14px; }
  .modal { width:100%; max-width:460px; background:var(--card-solid); border:1px solid var(--border-strong); border-radius:22px; padding:20px; }
  .modal h3 { margin:0 0 10px; font-size:18px; font-weight:900; }
  .modal ol { margin:0 0 14px; padding-inline-start:20px; line-height:2.1; font-size:14.5px; }
  .modal .btn { width:100%; }
  .sh-ic { display:inline-block; vertical-align:middle; width:20px; height:20px; color:var(--accent); }

  /* ── بحث يوتيوب ── */
  .yt-btns { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
  .yt-btns button { flex:1; min-width:96px; }
  .yt-btns button:disabled { opacity:.45; cursor:not-allowed; }
  .yt-item { display:flex; gap:10px; padding:10px 0; border-top:1px solid var(--border); align-items:stretch; }
  .yt-thumb { width:116px; flex:none; aspect-ratio:16/9; border-radius:10px; object-fit:cover; background:#000; }
  .yt-info { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
  .yt-t { font-size:13.5px; font-weight:700; line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  .yt-c { font-size:12px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .yt-b { display:flex; gap:6px; margin-top:auto; }
  .yt-b button { border:1px solid var(--border-strong); background:rgba(255,255,255,.06); color:var(--text); border-radius:10px;
    padding:6px 10px; font:inherit; font-size:12.5px; font-weight:700; cursor:pointer; }
  .yt-b .yt-play { background:linear-gradient(90deg, var(--accent), var(--accent2)); color:#fff; border:0; }

  /* ── رابط ضيف مؤقت ── */
  details.guest-card > summary { cursor:pointer; list-style:none; font-weight:900; font-size:16px; }
  details.guest-card > summary::-webkit-details-marker { display:none; }
  details.guest-card > summary small { display:block; margin-top:4px; color:var(--muted); font-weight:500; font-size:12.5px; line-height:1.6; }
  .guest-form { margin-top:14px; }
  .g-item { margin-top:12px; padding:12px; border:1px solid var(--border); border-radius:14px; background:rgba(0,0,0,.18); }
  .g-item.g-expired, .g-item.g-revoked, .g-item.g-used { opacity:.7; }
  .g-top { display:flex; align-items:center; gap:8px; margin-bottom:8px; flex-wrap:wrap; }
  .g-chip { font-size:11.5px; font-weight:800; padding:3px 9px; border-radius:99px; background:rgba(52,211,153,.16); color:var(--ok); }
  .g-expired .g-chip, .g-used .g-chip { background:rgba(251,191,36,.16); color:var(--warn); }
  .g-revoked .g-chip { background:rgba(248,113,113,.16); color:var(--err); }
  .g-left { margin-inline-start:auto; font-weight:800; font-variant-numeric:tabular-nums; direction:ltr; }
  .g-log { margin-top:8px; font-size:12.5px; }
  .g-log summary { cursor:pointer; color:var(--muted); }
  .g-log-row { display:flex; gap:10px; padding:5px 0; border-top:1px dashed var(--border); }
  .g-log-row .t { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .g-revoke { margin-top:8px; width:auto !important; padding:6px 12px !important; }

  /* ── شعار لوحة الدخول (نسختان: للداكن وللفاتح) ── */
  .auth-logo { display:block; width:min(250px, 78%); height:auto; }
  .auth-logo.logo-light { display:none; }
  [data-theme="light"] .auth-logo.logo-dark { display:none; }
  [data-theme="light"] .auth-logo.logo-light { display:block; }
  .brand b .you { color:var(--accent); }
  .footer .foot-logo { width:18px; height:auto; vertical-align:-3px; margin-inline-end:.35em; }
  .menu-btn.hidden { display:none; }

  /* ── الوضع الفاتح للميزات الجديدة ── */
  [data-theme="light"] .modal { background:#fff; color:#0f172a; }
  [data-theme="light"] .yt-b button { background:rgba(15,23,42,.06); color:#0f172a; }
  [data-theme="light"] .yt-b .yt-play { color:#fff; }
  [data-theme="light"] .g-item { background:rgba(15,23,42,.04); }
  /* ── الشريط العلوي على الجوال: أزرار التثبيت/YouTube أضافت عناصر — نضغط الحجم بدل أن يتجاوز الصفحة أفقياً ── */
  @media (max-width:480px) {
    .topbar .brand small { display:none; }
    .topbar .brand { gap:8px; }
    .topbar .logo { width:38px; height:38px; }
    .topbar .menu-btn { width:36px; height:36px; font-size:15px; border-radius:11px; }
    .topbar .toggles { gap:5px; }
    .topbar .user-chip { padding:3px; }
    .topbar .user-chip span { display:none; }
  }
  @media (max-width:400px) {          /* شاشات ضيقة جداً (≤400px): الأزرار تنزل لسطر ثانٍ بدل تجاوز الصفحة */
    .topbar { flex-wrap:wrap; row-gap:8px; }
    .topbar .toggles { order:3; flex:1 1 100%; justify-content:flex-end; }
  }
  [data-theme="light"] .install-banner { background:linear-gradient(90deg, rgba(250,10,27,.10), rgba(255,91,61,.06)); }
