/* ARIDO Dishdasha — «الموقع الدائم والوصول من الخارج» (settings tab, js/pages/remote.js): the address cards with their QR codes, the
   Tailscale chips, the address check, the CLI answer, the app pairing card and the illustrated guide. Same tokens as app.css. */

.rm-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.rm-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
@media (max-width: 1180px) { .rm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .rm-grid { grid-template-columns: 1fr; } }

/* one address */
.rm-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); padding: 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rm-card.green { border-top: 4px solid var(--green); } .rm-card.sky { border-top: 4px solid var(--sky); } .rm-card.amber { border-top: 4px solid var(--amber); }
.rm-card-h { display: flex; align-items: center; gap: 10px; }
.rm-card-h .ico { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--slate-soft); color: var(--slate); flex: none; }
.rm-card-h .ico svg { width: 20px; height: 20px; }
.rm-card-h .ico.green { background: var(--green-soft); color: var(--green); } .rm-card-h .ico.sky { background: var(--sky-soft); color: var(--sky-2); }
.rm-card-h .ico.amber { background: var(--amber-soft); color: var(--amber); }
.rm-card-h b { display: block; font-size: 15px; color: var(--ink); line-height: 1.3; } .rm-card-h small { display: block; color: var(--muted); font-size: 12px; }
.rm-url { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rm-url code { flex: 1 1 auto; min-width: 0; direction: ltr; text-align: left; unicode-bidi: isolate; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: var(--card-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 10px; font: 700 13px/1.4 var(--font); color: var(--navy-3); }
.rm-url code.none { direction: rtl; text-align: right; color: var(--muted); font-weight: 600; white-space: normal; }
.rm-qr { width: 156px; height: 156px; align-self: center; border: 1px solid var(--border); border-radius: 12px; padding: 6px; background: #fff; flex: none; }
.rm-qr img { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.rm-qr.empty { display: grid; place-items: center; color: #CBD5E1; background: repeating-linear-gradient(135deg, #FBFAF7 0 10px, #F3F1EB 10px 20px); }
.rm-qr.big { width: 250px; height: 250px; padding: 10px; border: 2px solid var(--sky-light); }

/* the Tailscale state */
.rm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rm-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 26px; padding: 2px 10px; border-radius: 13px; font-size: 12px; font-weight: 700; background: #EEEBE4; color: #475569; line-height: 1.3; }
.rm-chip svg { width: 14px; height: 14px; flex: none; }
.rm-chip.ok { background: var(--green-soft); color: var(--green); } .rm-chip.bad { background: var(--red-soft); color: var(--red); }
.rm-chip.warn { background: var(--amber-soft); color: var(--amber); }

/* the result of «فحص» under each address */
.rm-check { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; padding: 8px 10px; border-radius: 8px; background: var(--card-2); color: var(--slate); }
.rm-check svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.rm-check.ok { background: var(--green-soft); color: #166534; } .rm-check.bad { background: var(--red-soft); color: var(--red); }
.rm-check.warn { background: var(--amber-soft); color: #92400E; } .rm-check.muted { background: var(--card-2); color: var(--muted); }
.rm-check-url { direction: ltr; unicode-bidi: isolate; text-align: right; font-weight: 700; font-size: 11.5px; overflow-wrap: anywhere; }
.rm-alt .ltr { overflow-wrap: anywhere; }

/* a command to type by hand (click = copy) and the CLI's answer */
.rm-cmd { direction: ltr; unicode-bidi: isolate; display: inline-block; font: 600 12.5px/1.6 Consolas, 'Courier New', monospace; background: #0F172A; color: #7DD3FC;
  padding: 1px 8px; border-radius: 6px; cursor: copy; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.rm-cli pre { direction: ltr; text-align: left; margin: 0; background: #0F172A; color: #E2E8F0; padding: 12px 14px; border-radius: 10px; max-height: 240px; overflow: auto;
  font: 12px/1.55 Consolas, 'Courier New', monospace; white-space: pre-wrap; word-break: break-word; }

/* the app pairing QR */
.rm-pair { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; padding: 18px; border: 2px solid var(--sky-light); border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #F0F9FF 0%, #FFFFFF 70%); }
.rm-pair-t { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 800; color: var(--ink); }
.rm-pair-t svg { width: 22px; height: 22px; color: var(--sky-2); }
@media (max-width: 520px) { .rm-pair { padding: 14px; justify-content: center; } .rm-qr.big { width: min(260px, 72vw); height: min(260px, 72vw); } }

/* the guide */
.rm-guide { display: flex; flex-direction: column; gap: 10px; }
.rm-step { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); overflow: hidden; }
.rm-step > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 11px 14px; user-select: none; }
.rm-step > summary::-webkit-details-marker { display: none; }
.rm-step > summary:hover { background: var(--hover); }
.rm-step > summary .n { width: 32px; height: 32px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; }
.rm-step[open] > summary .n { background: var(--sky); }
.rm-step > summary .tt { display: flex; flex-direction: column; min-width: 0; }
.rm-step > summary .tt b { color: var(--ink); font-size: 15px; line-height: 1.35; } .rm-step > summary .tt small { color: var(--muted); font-size: 12px; }
.rm-step > summary .chev { margin-inline-start: auto; width: 20px; height: 20px; color: var(--muted); transition: transform .15s; flex: none; }
.rm-step[open] > summary { border-bottom: 1px solid var(--border-2); background: var(--card-2); }
.rm-step[open] > summary .chev { transform: rotate(180deg); }
.rm-step .body { padding: 14px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.rm-step .body.nopic { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1100px) { .rm-step .body { grid-template-columns: minmax(0, 1fr); } }
.rm-pic { margin: 0; min-width: 0; }
.rm-pic-in { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border-2); -webkit-overflow-scrolling: touch; }
.rm-pic-in svg { display: block; width: 100%; height: auto; min-width: 540px; }
.rm-pic-wait { aspect-ratio: 720 / 420; border-radius: 14px; background: repeating-linear-gradient(135deg, #FBFAF7 0 12px, #F3F1EB 12px 24px); }
.rm-pic figcaption { font-size: 11.5px; margin-top: 4px; text-align: left; }
.rm-list { margin: 0; padding-inline-start: 22px; display: flex; flex-direction: column; gap: 7px; line-height: 1.75; }
.rm-list li::marker { color: var(--sky-2); font-weight: 800; }
.rm-trouble td { vertical-align: top; font-size: 13px; line-height: 1.6; }
.rm-trouble td:first-child { font-weight: 700; color: var(--ink); }
