/* LuxWeb Editor · visual editor shell (top bar, live page frame, side panel). Uses tokens from app.css. */
.ed-body { overflow: hidden; }
.ed-body .auth { overflow: auto; height: 100vh; }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 22px; text-align: center; }
.how div { display: grid; gap: 6px; justify-items: center; font-size: .82rem; color: var(--muted); }
.how b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--gold-soft); color: var(--gold-ink); font-size: .85rem; }

.ed { position: fixed; inset: 0; display: flex; flex-direction: column; background: #e9e7e1; }
.ed > * { flex: none; }
.ed > .stage { flex: 1 1 auto; }
.ed svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed .menu svg circle { fill: currentColor; stroke: none; }

/* top bar */
.tb { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--ink); color: #fff; min-height: 58px; }
.tb__left { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1 1 0; }
.tb__site { display: grid; min-width: 0; }
.tb__site strong { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb__site select { margin-top: 2px; background: transparent; color: #cfd2da; border: 0; padding: 0; font: inherit; font-size: .8rem; cursor: pointer; max-width: 220px; }
.tb__site select option { color: var(--ink); }
.tb__mid { display: flex; align-items: center; gap: 8px; }
.tb__right { display: flex; align-items: center; gap: 8px; flex: 1 1 0; justify-content: flex-end; }
.tb__group { display: flex; gap: 2px; }
.seg { display: inline-flex; background: rgba(255,255,255,.08); border-radius: 10px; padding: 3px; }
.seg__b { border: 0; background: transparent; color: #cfd2da; font: 600 .85rem/1 var(--font); padding: 0 12px; height: 32px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.seg--icons .seg__b { padding: 0 9px; }
.seg__b.is-on { background: #fff; color: var(--ink); }
.ib { border: 0; background: transparent; color: #e8e9ee; width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; cursor: pointer; }
.ib:hover:not(:disabled) { background: rgba(255,255,255,.1); }
.ib:disabled { opacity: .35; cursor: default; }
.panel .ib { color: var(--ink); }
.panel .ib:hover { background: var(--paper); }
.chip { border: 0; background: rgba(255,255,255,.08); color: #e8e9ee; height: 36px; padding: 0 12px; border-radius: 999px; font: 600 .85rem/1 var(--font); display: inline-flex; align-items: center; gap: 8px; cursor: pointer; white-space: nowrap; }
.chip:hover { background: rgba(255,255,255,.14); }
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.btn--gold { background: var(--gold); color: var(--ink); min-height: 38px; }
.btn--gold:hover { background: #d8a64f; }
.btn--gold:disabled { background: #3a3f4a; color: #8d92a0; cursor: default; }
.menu { position: relative; }
.menu__list { position: absolute; right: 0; top: 44px; z-index: 50; background: #fff; color: var(--ink); border-radius: 12px; box-shadow: 0 16px 40px -12px rgba(0,0,0,.35); padding: 6px; min-width: 210px; display: grid; }
.menu__list a, .menu__list button { all: unset; box-sizing: border-box; padding: 10px 12px; border-radius: 8px; cursor: pointer; font-size: .92rem; }
.menu__list a:hover, .menu__list button:hover:not(:disabled) { background: var(--paper); }
.menu__list button:disabled { opacity: .4; cursor: default; }

.hintbar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 7px 14px; background: var(--gold-soft); color: var(--gold-ink); font-size: .88rem; border-bottom: 1px solid #efdfbf; }
.hintbar button { border: 0; background: none; color: inherit; font-size: 1.2rem; line-height: 1; cursor: pointer; padding: 0 4px; }

/* stage + frame */
.stage { position: relative; min-height: 0; display: flex; overflow: hidden; }
.frame { position: relative; flex: 1; min-width: 0; display: flex; justify-content: center; overflow: auto; padding: 0; transition: padding .2s; }
.frame iframe { border: 0; width: 100%; height: 100%; background: #fff; display: block; transition: width .25s ease, height .25s ease, border-radius .25s ease; }
.ed.is-phone .frame { padding: 18px 0; align-items: flex-start; }
.ed.is-phone .frame iframe { width: 390px; height: min(844px, calc(100% - 4px)); border-radius: 28px; box-shadow: 0 0 0 10px #15171c, 0 30px 60px -20px rgba(0,0,0,.45); }
.loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: #f5f4f0; color: var(--muted); z-index: 2; }
.loading[hidden] { display: none; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #e2dfd6; border-top-color: var(--gold); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* side panel */
.panel { width: 340px; flex: none; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; box-shadow: -12px 0 30px -24px rgba(0,0,0,.35); }
.panel__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 10px 18px; border-bottom: 1px solid var(--line-2); }
.panel__head h2 { font-size: 1.02rem; }
.panel__body { padding: 16px 18px 22px; overflow: auto; display: grid; gap: 12px; align-content: start; }
.ph__thumb { border-radius: 14px; overflow: hidden; background: var(--paper); aspect-ratio: 4 / 3; }
.ph__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph__alt { margin: 0; font-size: .85rem; color: var(--muted); }
.ph__pick { cursor: pointer; }
.ph__note { margin: -4px 0 0; font-size: .8rem; color: var(--faint); }
.ph__note.is-ok { color: var(--ok); }
.panel .lab input { width: 100%; }
.pn-h { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--faint); margin: 8px 0 0; }
.pn-p { margin: -4px 0 0; font-size: .85rem; }
.chg, .find__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.chg li, .find__list li { border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; }
.chg .row, .find__list .row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.chg .k, .find__list .k { font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); flex: none; }
.chg .t, .find__list .t { font-size: .88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; }
.chg button, .find__list button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 4px 9px; font-size: .78rem; cursor: pointer; flex: none; }
.chg button:hover, .find__list button:hover { border-color: var(--ink); }
.chg .none { color: var(--muted); font-size: .9rem; border-style: dashed; }
.find__list textarea, .meta textarea, .meta input { width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 9px 11px; font: inherit; font-size: .9rem; resize: vertical; }
.find__list textarea:focus, .meta textarea:focus, .meta input:focus, .find:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,150,59,.16); }
.find { width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; }
.meta { display: grid; gap: 10px; }
.meta label { display: grid; gap: 5px; font-size: .82rem; font-weight: 600; color: var(--ink-2); }

.ed .toast { bottom: 22px; }

/* narrow screens */
@media (min-width: 861px) and (max-width: 1100px) { .tb__mid .tb__group { display: none; } }
@media (max-width: 860px) {
  .tb { flex-wrap: wrap; gap: 8px; padding: 8px 10px; }
  .tb__left { flex: 1 1 0; order: 0; min-width: 0; }
  .tb__right { order: 1; flex: 0 0 auto; gap: 6px; }
  .tb__mid { order: 2; flex: 1 1 100%; justify-content: space-between; }
  .tb__site strong { max-width: none; }
  .btn--gold { padding: 0 14px; }
  .seg--icons, .hintbar { display: none; }
  .chip span:not(.chip__dot) { display: none; }
  .chip { padding: 0 11px; }
  .chip::after { content: "Changes"; }
  .panel { position: absolute; left: 0; right: 0; bottom: 0; width: auto; max-height: 72%; border-left: 0; border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; box-shadow: 0 -18px 40px -20px rgba(0,0,0,.4); z-index: 5; }
}

/* bilingual sites: language switch + one-language warnings */
.seg--lang { margin-top: 4px; }
.seg--lang .seg__b { height: 26px; padding: 0 10px; font-size: .78rem; }
.lang-warn { font-size: .78rem; color: #8a5a00; background: #fff4d6; padding: 4px 8px; border-radius: 6px; flex: 1; }
#chgList li.is-warn { border-left: 3px solid #e0a32a; }
.lang-ta { display: grid; gap: 4px; margin-top: 8px; font-size: .78rem; font-weight: 600; }
.lang-ta textarea { width: 100%; }
.tb__site .seg--lang { justify-self: start; }
