/* The hamburger menu, the phone search bar and the admin sidebar
   Moved out of styles.css on 2026-11-05 (one big file split by section; the rules are unchanged and in the same order).
   Every page links this file right after css/menu.css. */

/* ═════════════════════════════════════════════════════════════
   HEADER: hamburger menu (3 sections) + phone search directly under the header
   ═════════════════════════════════════════════════════════════ */
.hdr-start { display: flex; align-items: center; gap: 12px; min-width: 0; }
.logo-text { min-width: 0; }

/* Hamburger trigger: prominent, 3 lines that turn into an X while open */
.menu-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 14px;
  background: var(--card);
  border: 1px solid var(--b2);
  border-radius: 12px;
  color: var(--t1);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
  transition: border-color .18s, background .18s;
}
.menu-btn:hover, .menu-btn.is-open { border-color: var(--gold); background: rgba(212, 160, 23, 0.08); }
.menu-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.menu-bars { position: relative; display: block; width: 20px; height: 14px; flex-shrink: 0; }
.menu-bars i {
  position: absolute;
  inset-inline: 0;
  display: block;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transition: transform .2s ease, opacity .15s ease, top .2s ease;
}
.menu-bars i:nth-child(1) { top: 0; }
.menu-bars i:nth-child(2) { top: 6px; }
.menu-bars i:nth-child(3) { top: 12px; }
.menu-btn.is-open .menu-bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-btn.is-open .menu-bars i:nth-child(2) { opacity: 0; }
.menu-btn.is-open .menu-bars i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Dropdown / drawer */
.site-menu { position: absolute; top: 100%; inset-inline: 0; z-index: 120; pointer-events: none; }
.site-menu .wrap { display: flex; }
.menu-panel {
  pointer-events: auto;
  list-style: none;
  width: min(100%, 390px);
  max-height: calc(100vh - 90px);
  overflow-y: auto;
  margin-top: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--b2);
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  animation: menuIn .16s ease-out;
}
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  color: var(--t2);
  transition: background .15s, border-color .15s;
}
.menu-link:hover { background: var(--s); }
.menu-link.active { background: rgba(212, 160, 23, 0.08); border-color: rgba(212, 160, 23, 0.35); }
.menu-danger.active { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.35); }
.menu-ico { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; background: rgba(212, 160, 23, 0.12); color: var(--gold); }
.menu-danger .menu-ico { background: rgba(239, 68, 68, 0.12); color: var(--red); }
.menu-txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.menu-txt b { font-size: 14.5px; font-weight: 800; color: var(--t1); }
.menu-txt small { font-size: 11.5px; color: var(--t3); }
.menu-sub { list-style: none; margin: 2px 26px 6px 0; padding: 0 12px 0 0; border-inline-start: 2px solid var(--b2); display: flex; flex-direction: column; gap: 2px; }
.menu-sublink { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--t2); transition: background .15s, color .15s; }
.menu-sublink i { width: 16px; text-align: center; color: var(--t3); font-size: 13px; }
.menu-sublink:hover, .menu-sublink.active { background: var(--s); color: var(--gold); }
.menu-sublink:hover i, .menu-sublink.active i { color: var(--gold); }
.menu-link:focus-visible, .menu-sublink:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
@media (max-width: 480px) {
  .hdr-start { gap: 8px; }
  .menu-btn { width: 44px; padding: 0; justify-content: center; }
  .menu-label { display: none; }
  .menu-panel { width: 100%; }
}

@media (prefers-reduced-motion: reduce) { .menu-panel { animation: none; } .menu-bars i { transition: none; } }

/* Phone search page */
.ph-row { position: relative; }
.ph-ok { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--green); font-size: 15px; display: none; pointer-events: none; }
.phone-field.valid .ph-ok { display: block; }
.phone-field.valid .ph-input { border-color: rgba(34, 197, 94, 0.6); padding-right: 34px; }
.ps-card { background: var(--card); border: 1px solid var(--b1); border-top: 3px solid var(--gold); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 18px; max-width: 720px; }
.ps-head { display: flex; align-items: center; gap: 14px; }
.ps-ico { width: 48px; height: 48px; border-radius: 12px; background: rgba(212, 160, 23, 0.12); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.ps-head h2 { font-size: 17px; font-weight: 800; color: var(--t1); }
.ps-head p { font-size: 12.5px; color: var(--t2); margin-top: 2px; }
.ps-form { display: flex; align-items: flex-start; gap: 10px; }
.ps-form .phone-field { flex: 1; min-width: 0; }
.ps-btn { min-height: 44px; padding: 0 22px; gap: 8px; white-space: nowrap; }
.ps-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 720px; }
.ps-note { display: flex; gap: 12px; padding: 14px; background: var(--card); border: 1px solid var(--b1); border-radius: 12px; }
.ps-note > i { font-size: 18px; margin-top: 2px; color: var(--green); }
.ps-note-red > i { color: var(--red); }
.ps-note-gray > i { color: var(--t3); }
.ps-note b { display: block; font-size: 13.5px; color: var(--t1); }
.ps-note p { font-size: 12px; color: var(--t2); line-height: 1.7; margin-top: 2px; }
.ps-privacy { font-size: 12px; color: var(--t3); display: flex; align-items: center; gap: 8px; max-width: 720px; }
@media (max-width: 720px) {
  .ps-card { padding: 16px; }
  .ps-notes { grid-template-columns: 1fr; }
  .ps-btn { width: 44px; padding: 0; justify-content: center; }
  .ps-btn span { display: none; }
  .ph-country { padding: 0 8px; gap: 5px; }
}

/* Small phones: nothing may push the page sideways */
.form-foot { flex-wrap: wrap; }
@media (max-width: 480px) {
  .form-foot { flex-direction: column-reverse; align-items: stretch; }
  .form-foot .btn { width: 100%; justify-content: center; }
}

.admin-link-btn { white-space: nowrap; }
@media (max-width: 360px) {
  .logo-text { display: none; }
  .hdr-inner { gap: 8px; }
}

/* Requests on small screens: nothing may overlap or push the page sideways */
main { overflow-x: clip; }
.rq { min-width: 0; }
.rq-title span { display: block; white-space: nowrap; }
@media (max-width: 560px) {
  .rq { padding: 14px 14px 16px; gap: 12px; }
  .rq-top { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 10px 12px; }
  .rq-badge { grid-column: 1 / -1; justify-self: start; }
  .rq-meta { gap: 4px 16px; }
  .rq-steps li { font-size: 11px; }
  .pf-card { padding: 18px 16px; }
  .pf-id { align-items: flex-start; }
  .pf-actions .btn { flex: 1 1 auto; justify-content: center; }
  .pf-filters { gap: 6px; }
  .pf-chip { padding: 7px 12px; font-size: 12.5px; }
}

.reg-admin-note { margin: 0; padding: 12px 22px 0; font-size: 12.5px; color: var(--t2); line-height: 1.8; }

/* Admin buttons show they are working (and cannot be pressed twice) */
.btn.is-busy { opacity: .6; pointer-events: none; position: relative; }

/* ═════════════════════════════════════════════════════════════
   ADMIN: sidebar (أقسام لوحة الإدارة) + content, side by side. Sidebar sits on the right (RTL start) and
   stretches the full height of the content next to it, staying in view (sticky) while that content scrolls.
   ═════════════════════════════════════════════════════════════ */
.admin-shell { display: flex; align-items: flex-start; gap: 20px; }
.admin-shell-content { flex: 1; min-width: 0; }
.admin-groups {
  display: flex; flex-direction: column; gap: 6px;
  width: 220px; flex-shrink: 0; align-self: stretch;
  padding: 14px; background: var(--s); border: 1px solid var(--b1); border-radius: 14px;
  position: sticky; top: 20px;
}
.admin-group-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border-radius: 10px; border: 1px solid transparent; background: transparent;
  color: var(--t2); font-size: 14.5px; font-weight: 800; font-family: inherit; cursor: pointer; text-align: right;
  transition: background .15s, color .15s, border-color .15s;
}
.admin-group-btn i { width: 18px; text-align: center; flex-shrink: 0; }
.admin-group-btn .badge-count { margin-inline-start: auto; }
.admin-group-btn:hover { color: var(--t1); background: var(--card); }
.admin-group-btn.active { background: rgba(212, 160, 23, 0.14); border-color: var(--gold); color: var(--gold); }
/* الفون: شريط سفلي عائم (pill) دائري ثابت، وأيقونة القسم النشط بترفع لفقاعة دائرية عايمة فوق الشريط.
   الرسم والحركة في js/liquid-nav.js */
@media (max-width: 900px) {
  .admin-shell { flex-direction: column; align-items: stretch; }
  .admin-shell-content { padding-bottom: 96px; }
  .admin-groups {
    position: fixed; top: auto; bottom: 10px; inset-inline: 14px; z-index: 60;
    flex-direction: row; width: auto; height: 64px; align-self: auto;
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
    padding: 0; gap: 0; overflow: visible;
  }
  .admin-group-btn {
    position: relative; flex: 1 1 0; min-width: 0; flex-direction: column; align-items: center;
    justify-content: space-between; text-align: center;
    padding: 12px 2px 8px; font-size: 10px; background: transparent !important; border-color: transparent !important;
  }
  .admin-group-btn:hover { background: transparent !important; }
  .admin-group-btn i { width: auto; font-size: 15px; }
  .admin-group-btn.active i { visibility: hidden; }
  .admin-group-btn span {
    max-width: 100%; line-height: 1.15; overflow: hidden; word-break: break-word;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .admin-group-btn.active span { color: var(--gold); font-weight: 900; }
  .admin-group-btn .badge-count { position: absolute; top: 4px; inset-inline-end: 14%; margin-inline-start: 0; }
  .admin-group-btn.active .badge-count { top: -34px; inset-inline-end: 22%; }
}
#grp-requests .admin-subnav { gap: 8px; }
#grp-requests .admin-subtab-btn { padding: 8px 16px; font-size: 13px; }
/* phone: the section tabs wrap into rows instead of running off the edge of the screen */
@media (max-width: 640px) {
  .admin-subnav { flex-wrap: wrap; overflow-x: visible; }
  #grp-requests .admin-subtab-btn { flex: 1 1 auto; justify-content: center; padding: 9px 12px; }
}

.add-intro { font-size: 13.5px; color: var(--t2); margin-bottom: 14px; line-height: 1.8; }
.add-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.add-opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: right;
  padding: 16px; background: var(--card); border: 1px solid var(--b1); border-radius: 14px;
  color: var(--t1); font-family: inherit; cursor: pointer; transition: border-color .15s, transform .15s, background .15s;
}
.add-opt:hover { border-color: var(--b2); transform: translateY(-2px); }
.add-opt.active { border-color: var(--gold); background: rgba(212, 160, 23, 0.07); }
.add-opt-danger.active { border-color: var(--red); background: rgba(239, 68, 68, 0.07); }
.add-opt b { font-size: 15px; font-weight: 800; }
.add-opt small { font-size: 12px; color: var(--t3); }
.add-opt-ico { width: 40px; height: 40px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 17px; margin-bottom: 6px; }
.add-opt-ico.gold   { background: rgba(212, 160, 23, 0.12); color: var(--gold); }
.add-opt-ico.blue   { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }
.add-opt-ico.purple { background: rgba(139, 92, 246, 0.12); color: #a78bfa; }
.add-opt-ico.red    { background: rgba(239, 68, 68, 0.12); color: #f87171; }

.add-form .card-body > .fsec { margin-top: 22px; }
.add-form .card-body > .fsec:first-child { margin-top: 0; }
.add-form .fsec { margin-bottom: 14px; }
.fg select.add-select {
  cursor: pointer; padding-inline-end: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23a0a0a8' stroke-width='2' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: left 12px center;
}
.fg select.add-select:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.12); outline: none; }
.add-check { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; font-size: 14px; color: var(--t1); cursor: pointer; }
.fg .add-check input { width: 18px; height: 18px; padding: 0; margin: 0; -webkit-appearance: auto; appearance: auto; accent-color: var(--gold); }

.add-submit { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--b1); }
.add-submit .adm-hint { flex: 1 1 260px; }
.add-logo-preview { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--b2); }
.upz[data-add-logo] { cursor: pointer; }

@media (max-width: 900px) { .add-picker { grid-template-columns: 1fr 1fr; } }

@media (max-width: 480px) {
  .add-opt { padding: 13px; }
  .add-submit .btn { width: 100%; justify-content: center; }
}

/* Admin header: hidden only until the saved name / photo (or the live profile) is in place, so it never blinks */
.admin-capsule-text:not(.is-ready) { visibility: hidden; }
.admin-capsule-ava:not([data-ready]) { opacity: 0; }

/* Short reference code on admin cards, evidence pictures */
.idc-code { font-size: 12px; font-weight: 800; letter-spacing: .04em; color: var(--gold); background: rgba(212, 160, 23, 0.1); border: 1px solid rgba(212, 160, 23, 0.3); border-radius: 8px; padding: 3px 9px; }
.blk-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.blk-thumbs:empty { display: none; }
.blk-thumb { position: relative; width: 84px; height: 84px; border-radius: 10px; overflow: hidden; border: 1px solid var(--b2); background: var(--s); }
.blk-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.blk-thumb-x { position: absolute; top: 4px; inset-inline-start: 4px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.blk-thumb-x:hover { background: var(--red); }
#blk-upz, #add-blk-upz { cursor: pointer; }
