/* ลิสต์ร้านโปรด / restaurant lists (2026-10-11, features Phase 6).
   Builds on /malitools/bills/calc.css (cards, fields) and /food.css (buttons, chips). */
.rl-page { --app: #ff9a1f; --app-2: #ff4b2b; --app-ink: #111111; --app-soft: #e9e2d3; }
html[data-theme="dark"] .rl-page { --app-soft: #3a2a17; }
.rl-page [hidden] { display: none !important; }

/* my lists */
.rl-lists { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rl-lists a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--edge, #111111); border-radius: 16px;
  background: var(--bg); color: var(--text); text-decoration: none; min-width: 0; }
.rl-lists a:hover { background: var(--app-soft); }
.rl-lists b { display: block; font-size: 15.5px; font-weight: 800; overflow-wrap: anywhere; }
.rl-lists small { display: block; color: var(--muted); font-size: 13px; font-weight: 700; }
.rl-lists span { flex: 1; min-width: 0; }
.rl-lists i { font-style: normal; font-weight: 900; color: var(--muted); }
.rl-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border: 1.5px solid var(--line-strong); border-radius: 999px;
  font-size: 11.5px; font-weight: 800; vertical-align: 2px; color: var(--muted); }
.rl-badge.pub { border-color: #1f8a4c; color: #1f8a4c; }
.rl-new { display: grid; gap: 10px; }
.rl-row { display: flex; gap: 10px; flex-wrap: wrap; }
.rl-row .cc-in { flex: 1 1 200px; }
.rl-row .fd-btn { flex: 0 0 auto; }

/* the items */
.rl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rl-item { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; padding: 12px; border: 2px solid var(--edge, #111111);
  border-radius: 16px; background: var(--bg); min-width: 0; }
.rl-rank { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--accent, #ff4b2b); color: #fff;
  font-weight: 900; font-size: 16px; }
.rl-main { min-width: 0; display: grid; gap: 2px; }
.rl-main b { font-size: 16px; font-weight: 800; overflow-wrap: anywhere; }
.rl-main small { color: var(--muted); font-weight: 700; font-size: 13px; overflow-wrap: anywhere; }
.rl-main p { margin: 4px 0 0; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.rl-main a { justify-self: start; margin-top: 4px; font-size: 13.5px; font-weight: 800; color: var(--accent, #ff4b2b); }
.rl-tools { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; }
.rl-tools button { min-width: 44px; min-height: 40px; padding: 6px 12px; border: 2px solid var(--edge, #111111); border-radius: 12px;
  background: var(--surface); color: var(--text); font: 800 14px/1 var(--font-body); cursor: pointer; }
.rl-tools button[disabled] { opacity: .35; pointer-events: none; }
.rl-tools button.del { margin-left: auto; color: var(--accent, #ff4b2b); }
.rl-item.empty { border-style: dashed; background: transparent; align-items: center; }
.rl-item.empty .rl-rank { background: var(--line-strong); color: var(--surface); }
.rl-item.empty button { justify-self: start; min-height: 40px; padding: 6px 14px; border: 2px dashed var(--line-strong); border-radius: 12px;
  background: transparent; color: var(--muted); font: 800 14px/1 var(--font-body); cursor: pointer; }
.rl-item.empty span.wait { color: var(--muted); font-weight: 700; font-size: 14px; }
.rl-item.flash { animation: rl-flash .5s ease-out; }
@keyframes rl-flash { from { background: var(--app-soft); } to { background: var(--bg); } }

/* the add / edit form */
.rl-form textarea { width: 100%; min-height: 76px; padding: 10px 12px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--surface);
  color: var(--text); font: 500 15px/1.5 var(--font-body); resize: vertical; box-sizing: border-box; }
.rl-form .cc-in input { padding-right: 12px; }
.rl-count { font-weight: 700; font-size: 12px; color: var(--muted); }

/* public switch */
.rl-switch { display: flex; align-items: center; gap: 12px; cursor: pointer; font-weight: 800; }
.rl-switch input { appearance: none; -webkit-appearance: none; flex: none; width: 52px; height: 30px; margin: 0; border: 2px solid var(--edge, #111111);
  border-radius: 999px; background: var(--line-strong); position: relative; cursor: pointer; transition: background .18s; }
.rl-switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff;
  border: 2px solid var(--edge, #111111); box-sizing: border-box; transition: transform .18s; }
.rl-switch input:checked { background: #1f8a4c; }
.rl-switch input:checked::after { transform: translateX(22px); }
.rl-switch input:focus-visible { outline: 3px solid color-mix(in srgb, var(--app) 55%, transparent); outline-offset: 2px; }
.rl-link { display: flex; gap: 8px; }
.rl-link input { flex: 1; min-width: 0; padding: 10px 12px; border: 2px solid var(--line-strong); border-radius: 12px; background: var(--bg);
  color: var(--text); font: 600 13.5px var(--font-body); }
.rl-preview { display: block; width: 100%; max-width: 260px; margin: 0 auto; border: 2px solid var(--edge, #111111); border-radius: 14px; }
.rl-danger { color: var(--accent, #ff4b2b) !important; }

/* the shared (public) view */
.rl-view-head { display: flex; gap: 14px; align-items: center; }
.rl-view-head img { flex: none; width: 72px; height: 72px; }
.rl-view-head p { margin: 0; color: var(--muted); font-weight: 700; }
.rl-view .rl-item { grid-template-columns: auto 1fr; }

@media (prefers-reduced-motion: reduce) {
  .rl-switch input, .rl-switch input::after { transition: none; }
  .rl-item.flash { animation: none; }
}

/* the editor's side column is taller than a screen: let it scroll with the page */
.rl-page .cc-side { position: static; }
