/* ============================================================
   powergreen — live edit skin.

   Everything here is scoped to .pg-le* so it can never leak into
   the public site. Colours are literal, not themed, so the bar
   stays legible on every page.
   ============================================================ */

.pg-le-bar,
.pg-le-bar * { box-sizing: border-box; }

.pg-le-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: #0c1a14;
  border-top: 1px solid rgba(var(--green-rgb), .35);
  box-shadow: 0 -14px 40px rgba(0, 0, 0, .35);
  font: 500 13.5px/1.35 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #e6f2eb;
  direction: ltr;
}

.pg-le-bar .pg-le-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: .01em;
  padding-inline-end: 12px;
  margin-inline-end: 4px;
  border-inline-end: 1px solid rgba(255, 255, 255, .12);
}

.pg-le-bar .pg-le-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #2ec27e;
  box-shadow: 0 0 0 4px rgba(var(--green-rgb), .18);
}
.pg-le-bar.on .pg-le-dot { animation: pgLePulse 1.8s ease-in-out infinite; }
@keyframes pgLePulse {
  50% { box-shadow: 0 0 0 8px rgba(var(--green-rgb), .05); }
}

.pg-le-bar .pg-le-hint { color: #93a89d; font-weight: 400; font-size: 12.5px; }
.pg-le-bar .pg-le-spacer { margin-inline-start: auto; }

.pg-le-btn {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .05);
  color: #e6f2eb;
  border-radius: 9px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background .15s ease, border-color .15s ease, transform .1s ease;
}
.pg-le-btn:hover { background: rgba(255, 255, 255, .11); border-color: rgba(255, 255, 255, .3); }
.pg-le-btn:active { transform: translateY(1px); }
.pg-le-btn.primary {
  background: #2ec27e; border-color: #2ec27e; color: #05130c; font-weight: 600;
}
.pg-le-btn.primary:hover { background: #3ad48d; border-color: #3ad48d; }
.pg-le-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pg-le-btn.danger:hover { background: rgba(233, 94, 94, .18); border-color: rgba(233, 94, 94, .5); }

.pg-le-chip {
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(var(--green-rgb), .14);
  border: 1px solid rgba(var(--green-rgb), .3);
  color: #7ee2b0;
  font-size: 12px;
  font-weight: 600;
}
.pg-le-chip.warn { background: rgba(240, 178, 74, .14); border-color: rgba(240, 178, 74, .35); color: #f0b24a; }

/* keep the page clear of the bar */
body.pg-le-active { padding-bottom: 66px; }

/* ---------- editable fields ---------- */
body.pg-le-editing [data-pg-ed] {
  outline: 1px dashed rgba(var(--green-rgb), .5);
  outline-offset: 3px;
  border-radius: 3px;
  cursor: text;
  transition: outline-color .15s ease, background .15s ease;
  min-width: 14px;
  min-height: 1em;
  display: inline-block;
}
body.pg-le-editing p[data-pg-ed],
body.pg-le-editing li[data-pg-ed],
body.pg-le-editing h1[data-pg-ed],
body.pg-le-editing h2[data-pg-ed],
body.pg-le-editing h3[data-pg-ed],
body.pg-le-editing div[data-pg-ed] { display: block; }

body.pg-le-editing [data-pg-ed]:hover {
  outline-color: #2ec27e;
  background: rgba(var(--green-rgb), .07);
}
body.pg-le-editing [data-pg-ed]:focus {
  outline: 2px solid #2ec27e;
  background: rgba(var(--green-rgb), .1);
}
body.pg-le-editing [data-pg-ed]:empty::before {
  content: "＋ text";
  color: rgba(var(--green-rgb), .8);
  font-size: 12px;
}
body.pg-le-editing [data-pg-touched] { outline-color: #f0b24a; }
body.pg-le-editing [data-pg-open] {
  outline: 2px solid #2ec27e;
  background: rgba(var(--green-rgb), .12);
}

/* images and records answer to a click, not a caret */
body.pg-le-editing [data-edit-img],
body.pg-le-editing [data-edit-rec] {
  cursor: pointer;
  outline: 1px dashed rgba(var(--green-rgb), .45);
  outline-offset: 3px;
}
body.pg-le-editing [data-edit-img]:hover,
body.pg-le-editing [data-edit-rec]:hover { outline: 2px solid #2ec27e; }

/* links must not navigate while editing */
body.pg-le-editing a { cursor: default; }

/* ---------- overlays (login, media, record) ---------- */
.pg-le-veil {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(var(--ink-rgb), .62);
  backdrop-filter: blur(4px);
  font: 400 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  direction: ltr;
}

.pg-le-panel {
  width: min(680px, 100%);
  max-height: 86vh;
  overflow: auto;
  background: #0f1f18;
  color: #e6f2eb;
  border: 1px solid rgba(var(--green-rgb), .25);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .5);
}
.pg-le-panel.narrow { width: min(380px, 100%); }

.pg-le-panel h2 {
  margin: 0 0 4px;
  font: 600 19px/1.3 Inter, system-ui, sans-serif;
  color: #fff;
}
.pg-le-panel .pg-le-sub { margin: 0 0 18px; color: #93a89d; font-size: 13px; }

.pg-le-panel label.pg-le-f {
  display: block;
  margin-bottom: 14px;
}
.pg-le-panel label.pg-le-f > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #8fa79a;
}
.pg-le-panel input[type="text"],
.pg-le-panel input[type="password"],
.pg-le-panel textarea,
.pg-le-panel select {
  width: 100%;
  background: #08150f;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 9px;
  padding: 10px 12px;
  color: #e6f2eb;
  font: inherit;
  resize: vertical;
}
.pg-le-panel input:focus,
.pg-le-panel textarea:focus,
.pg-le-panel select:focus { outline: 2px solid #2ec27e; border-color: transparent; }
.pg-le-panel textarea { min-height: 92px; }

.pg-le-row { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.pg-le-row.split { justify-content: space-between; }
.pg-le-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.pg-le-err { color: #ff9d9d; font-size: 13px; min-height: 18px; margin-top: 4px; }

.pg-le-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.pg-le-grid button {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, .12);
  background: #08150f;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  justify-items: center;
}
.pg-le-grid button:hover { border-color: #2ec27e; }
.pg-le-grid button.on { border-color: #2ec27e; box-shadow: 0 0 0 2px rgba(var(--green-rgb), .25); }
.pg-le-grid img { width: 100%; height: 66px; object-fit: contain; }
.pg-le-grid small { color: #8fa79a; font-size: 10.5px; word-break: break-all; text-align: center; }

/* ---------- toast ---------- */
.pg-le-toast {
  position: fixed;
  bottom: 78px;
  inset-inline-end: 18px;
  z-index: 9200;
  background: #123024;
  border: 1px solid rgba(var(--green-rgb), .4);
  color: #d8f5e6;
  padding: 11px 16px;
  border-radius: 11px;
  font: 500 13.5px/1.4 Inter, system-ui, sans-serif;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .4);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  direction: ltr;
}
.pg-le-toast.on { opacity: 1; transform: none; }
.pg-le-toast.bad { background: #33161a; border-color: rgba(233, 94, 94, .5); color: #ffd6d6; }



/* ---------- the bilingual popover ----------
   Both languages at once, so the copy never depends on which one
   the page happens to be showing. Literal colours, like the bar. */
.pg-le-pop,
.pg-le-pop * { box-sizing: border-box; }

.pg-le-pop {
  position: fixed;
  z-index: 9200;
  width: min(360px, calc(100vw - 24px));
  padding: 12px 13px 11px;
  background: #0c1a14;
  border: 1px solid rgba(var(--green-rgb), .35);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(0, 0, 0, .5);
  font: 500 13px/1.4 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #e6f2eb;
  direction: ltr;
  animation: pgLePop .14s ease-out;
}

@keyframes pgLePop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.pg-le-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.pg-le-pop-head b { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #8fd6b1; }

.pg-le-pop-x {
  border: 0;
  background: transparent;
  color: #93a89d;
  font-size: 19px;
  line-height: 1;
  padding: 0 3px;
  cursor: pointer;
}
.pg-le-pop-x:hover { color: #e6f2eb; }

.pg-le-pf { display: block; margin-bottom: 9px; }
.pg-le-pf > span {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #93a89d;
}
.pg-le-pf > span i { font-style: normal; text-transform: none; letter-spacing: 0; color: #2ec27e; }
.pg-le-pf.live > span { color: #cfe6da; }

.pg-le-pop textarea {
  width: 100%;
  resize: vertical;
  min-height: 44px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 9px;
  color: #f2fbf6;
  font: 400 13.5px/1.45 Inter, system-ui, sans-serif;
}
.pg-le-pop textarea:focus { outline: 2px solid #2ec27e; border-color: transparent; }
.pg-le-pop textarea[lang="ar"] { font-size: 14.5px; }

.pg-le-pop-foot {
  margin-top: 2px;
  font-size: 10.5px;
  color: #6f8579;
  word-break: break-all;
}

@media (max-width: 640px) {
  .pg-le-bar { gap: 7px; padding: 8px 10px; font-size: 12.5px; }
  .pg-le-btn { padding: 7px 10px; }
  .pg-le-bar .pg-le-hint { display: none; }
  body.pg-le-active { padding-bottom: 96px; }
  .pg-le-cols { grid-template-columns: 1fr; }
}
