/* Avondale Prep — inline site editor UI (admin only). Navy/gold theme. */

body.has-adm-bar { padding-bottom: 60px; }

.adm-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9000;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 16px; background: #14204a; color: #fff;
  border-top: 2px solid var(--gold, #c8a455);
  font-family: var(--font-body, "Source Sans 3", sans-serif); font-size: 14px;
  box-shadow: 0 -8px 24px rgba(15, 25, 55, .28);
}
.adm-brand { font-weight: 800; color: var(--gold, #c8a455); letter-spacing: .2px; }
.adm-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.adm-name { opacity: .7; font-size: 12.5px; }
.adm-status { font-size: 13px; opacity: .9; min-height: 1em; }

.adm-btn {
  font: inherit; font-weight: 700; cursor: pointer; border-radius: 8px;
  padding: 7px 14px; border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .08); color: #fff; transition: all .15s ease;
}
.adm-btn:hover { background: rgba(255, 255, 255, .16); }
.adm-primary { background: var(--gold, #c8a455); border-color: var(--gold, #c8a455); color: #1b1405; }
.adm-primary:hover { filter: brightness(1.06); background: var(--gold, #c8a455); }
.adm-save { background: #16a34a; border-color: #16a34a; color: #fff; }
.adm-save:hover { background: #15912e; }
.adm-ghost { background: transparent; }
.adm-active { outline: 2px solid #fff; }
.adm-hide { display: none !important; }

/* Editable elements while editing (page body + header/footer chrome) */
/* Every editable box looks the SAME — same weight, same style, same offset —
   whether it is idle, hovered or being typed in. Only the colour and a faint
   background change, so the box never jumps or redraws as the caret moves
   from one to the next. */
body.adm-editing .adm-edit {
  outline: 2px solid rgba(200, 164, 85, .5);
  outline-offset: 3px; border-radius: 3px; cursor: text;
  transition: background .15s ease, outline-color .15s ease;
}
body.adm-editing .adm-edit:hover { background: rgba(200, 164, 85, .1); outline-color: rgba(200, 164, 85, .8); }
body.adm-editing .adm-edit:focus { outline-color: var(--gold, #c8a455); background: rgba(200, 164, 85, .12); }
/* Inline chrome bits (phone, email, labels) read better with a little breathing room */
body.adm-editing .topbar .adm-edit, body.adm-editing .site-footer .adm-edit { outline-offset: 2px; }

/* Settings modal */
.adm-overlay {
  position: fixed; inset: 0; z-index: 9100; display: grid; place-items: center;
  background: rgba(15, 25, 55, .55); opacity: 0; pointer-events: none; transition: opacity .18s ease;
  padding: 20px;
}
.adm-overlay.adm-open { opacity: 1; pointer-events: auto; }
.adm-modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow: auto;
  background: #fff; color: var(--text, #2c2c2c); border-radius: 16px; padding: 24px 24px 20px;
  box-shadow: 0 30px 70px rgba(15, 25, 55, .35); transform: translateY(8px); transition: transform .18s ease;
  font-family: var(--font-body, "Source Sans 3", sans-serif);
}
.adm-overlay.adm-open .adm-modal { transform: none; }
.adm-modal h3 { font-family: var(--font-heading, "Playfair Display", serif); color: var(--navy, #1a2744); margin: 0 0 16px; font-size: 22px; }
.adm-logo-row { display: flex; gap: 14px; align-items: center; padding: 12px; background: var(--cream, #faf6ee); border-radius: 12px; margin-bottom: 16px; }
.adm-logo-prev { width: 56px; height: 56px; object-fit: contain; background: #fff; border-radius: 10px; border: 1px solid var(--border, #e8e2d6); padding: 4px; }
.adm-field { margin-bottom: 12px; display: flex; flex-direction: column; gap: 5px; }
.adm-field label { font-size: 12.5px; font-weight: 700; color: var(--navy, #1a2744); }
.adm-field input, .adm-field textarea {
  font: inherit; padding: 9px 11px; border: 1px solid var(--border, #e8e2d6); border-radius: 9px;
  background: #fff; color: inherit; width: 100%; box-sizing: border-box;
}
.adm-field input:focus, .adm-field textarea:focus { outline: 2px solid var(--gold, #c8a455); border-color: var(--gold, #c8a455); }
.adm-field textarea { min-height: 78px; resize: vertical; }
.adm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.adm-actions .adm-btn { color: #fff; background: #6b7280; border-color: #6b7280; }
.adm-actions .adm-ghost { background: transparent; color: var(--text-light, #5a5a5a); border-color: var(--border, #e8e2d6); }
.adm-actions .adm-primary { background: var(--navy, #1a2744); border-color: var(--navy, #1a2744); color: #fff; }
.adm-modal-msg { text-align: right; font-size: 13px; color: var(--text-light, #5a5a5a); margin-top: 10px; min-height: 1em; }

/* Editable links (hero/CTA buttons + social) */
body.adm-editing .adm-link-edit { outline: 2px dashed rgba(37, 99, 235, .85); outline-offset: 3px; cursor: pointer; }
body.adm-editing .adm-link-edit:hover { outline-color: #2563eb; background: rgba(37, 99, 235, .08); }

/* Link editor popover */
.adm-pop {
  position: absolute; z-index: 9200; width: 300px; max-width: calc(100vw - 20px);
  background: #fff; color: var(--text, #2c2c2c); border-radius: 12px; padding: 14px;
  box-shadow: 0 18px 44px rgba(15, 25, 55, .3); border: 1px solid var(--border, #e8e2d6);
  font-family: var(--font-body, "Source Sans 3", sans-serif);
}
.adm-pop-title { font-weight: 800; color: var(--navy, #1a2744); margin-bottom: 10px; font-size: 14px; }
.adm-pop .adm-field { margin-bottom: 10px; }
.adm-pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
.adm-pop-actions .adm-ghost { background: transparent; color: var(--text-light, #5a5a5a); border-color: var(--border, #e8e2d6); }
.adm-pop-actions .adm-primary { background: var(--navy, #1a2744); border-color: var(--navy, #1a2744); color: #fff; }

/* SEO & media modal bits */
.adm-sub { font-weight: 800; color: var(--navy, #1a2744); font-size: 12px; margin: 16px 0 6px; text-transform: uppercase; letter-spacing: .05em; }
.adm-hero-btn { position: absolute; top: 16px; right: 16px; z-index: 20; box-shadow: 0 6px 18px rgba(15, 25, 55, .32); }

/* Added page blocks: the "+ Add" button on a zone, and per-block delete */
.adm-zone-add {
  display: inline-flex; align-items: center; gap: 6px; margin: 8px 6px 8px 0;
  font-size: 12.5px; font-weight: 700; padding: 6px 13px; border-radius: 20px; cursor: pointer;
  border: 1.5px dashed var(--gold, #c8a455); background: rgba(200, 164, 85, .1);
  color: var(--navy, #1a2744); font-family: var(--font-body, sans-serif);
}
.adm-zone-add:hover { background: rgba(200, 164, 85, .22); border-style: solid; }
/* On dark sections the dashed pill needs to lift off the background. */
.section--navy .adm-zone-add, .hero .adm-zone-add { color: #fff; background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .5); }

body.adm-editing .adm-block { position: relative; outline: 1.5px dashed rgba(37, 99, 235, .5); outline-offset: 4px; border-radius: 4px; }
.adm-block-del {
  position: absolute; top: -10px; right: -10px; z-index: 15;
  width: 22px; height: 22px; padding: 0; line-height: 1; border-radius: 50%; cursor: pointer;
  border: 0; background: #b91c1c; color: #fff; font-size: 15px; font-weight: 700;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.adm-block-del:hover { background: #991b1b; }
body:not(.adm-editing) .adm-block-del, body:not(.adm-editing) .adm-zone-add { display: none; }

/* Removing a built-in section or card */
body.adm-editing .adm-part { outline: 1.5px dashed rgba(185, 28, 28, .35); outline-offset: 6px; border-radius: 4px; }
/* Labelled rather than a bare ×: on a long page a 24px dot is easy to miss,
   and it is not obvious what it would remove. */
.adm-part-del {
  position: absolute; top: 8px; right: 8px; z-index: 14;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; line-height: 1; border-radius: 20px; cursor: pointer; white-space: nowrap;
  border: 1.5px solid #fff; background: #b91c1c; color: #fff;
  font-family: var(--font-body, sans-serif); font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .32); opacity: .82; transition: opacity .15s ease, transform .15s ease;
}
.adm-part:hover > .adm-part-del { opacity: 1; transform: scale(1.04); }
.adm-part-del:hover { background: #991b1b; }
/* Sections start at the very top of the page, where the sticky header sits. */
body.adm-editing .hero > .adm-part-del { top: 84px; }
body:not(.adm-editing) .adm-part-del { display: none; }

.adm-removed { display: grid; gap: 8px; margin-top: 4px; }
.adm-removed-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--border, #e8e2d6); border-radius: 10px; font-size: 14px;
}
.adm-removed-row .adm-btn { padding: 5px 12px; font-size: 12.5px; }
.adm-hint { font-size: 13.5px; color: var(--text-light, #5a5a5a); }

/* Colours & theme modal */
.adm-modal-wide { max-width: 720px; }
.adm-modal-wide > .adm-sub:first-of-type { text-transform: none; letter-spacing: 0; font-size: 13.5px; font-weight: 500; color: var(--text-light, #5a5a5a); line-height: 1.6; margin: 0 0 18px; }
.adm-themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.adm-theme {
  font: inherit; text-align: left; cursor: pointer; display: block; width: 100%;
  background: #fff; border: 1.5px solid var(--border, #e8e2d6); border-radius: 12px;
  padding: 12px 14px 13px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.adm-theme:hover { border-color: #9aa3b2; transform: translateY(-1px); }
.adm-theme-on { border-color: var(--navy, #1a2744); box-shadow: 0 0 0 3px rgba(15, 25, 55, .12); }
.adm-theme-sw { display: flex; gap: 4px; margin-bottom: 9px; }
.adm-theme-sw i { display: block; width: 100%; height: 22px; border-radius: 5px; border: 1px solid rgba(0, 0, 0, .08); }
.adm-theme-name { display: block; font-weight: 800; font-size: 14px; color: var(--navy, #1a2744); }
.adm-theme-note { display: block; font-size: 12px; color: var(--text-light, #5a5a5a); line-height: 1.45; margin-top: 2px; }

.adm-colors { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.adm-color label { display: block; font-size: 12.5px; font-weight: 700; color: var(--navy, #1a2744); margin-bottom: 5px; }
.adm-color-row { display: flex; gap: 8px; align-items: center; }
.adm-color-row input[type=color] {
  width: 46px; height: 38px; padding: 2px; flex: 0 0 auto; cursor: pointer;
  border: 1px solid var(--border, #e8e2d6); border-radius: 9px; background: #fff;
}
.adm-hex {
  font: inherit; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px;
  text-transform: lowercase; width: 100%; min-width: 0; padding: 9px 10px;
  border: 1px solid var(--border, #e8e2d6); border-radius: 9px; background: #fff; color: inherit;
}
.adm-hex:focus { outline: 2px solid var(--gold, #c8a455); border-color: var(--gold, #c8a455); }
.adm-hint { font-size: 11.5px; color: var(--text-light, #5a5a5a); line-height: 1.4; margin-top: 4px; }

@media (max-width: 640px) {
  .adm-bar { font-size: 13px; gap: 7px; padding: 8px 12px; }
  .adm-name { display: none; }
  .adm-btn { padding: 6px 10px; }
  .adm-themes { grid-template-columns: 1fr 1fr; }
  .adm-colors { grid-template-columns: 1fr; }
}

/* Picture slots while editing */
body.adm-editing .pic{outline:2px dashed rgba(37,99,235,.6);outline-offset:4px;cursor:pointer}
body.adm-editing .pic:hover{outline-color:#2563eb}
body.adm-editing .pic--empty{min-height:150px}
.adm-pic-btn{position:absolute;left:50%;bottom:12px;transform:translateX(-50%);z-index:12;
  padding:6px 14px;border-radius:20px;border:1.5px solid #fff;background:#2563eb;color:#fff;
  font-family:var(--font-body,sans-serif);font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap;
  box-shadow:0 2px 10px rgba(0,0,0,.3)}
.adm-pic-btn:hover{background:#1d4ed8}
body:not(.adm-editing) .adm-pic-btn{display:none}
/* Picture removes carry their own class: the block/section clean-up sweeps
   .adm-part-del, which would otherwise take these away again. */
.adm-pic-del{position:absolute;top:8px;right:8px;z-index:14;width:26px;height:26px;padding:0;line-height:1;
  border-radius:50%;cursor:pointer;border:1.5px solid #fff;background:#b91c1c;color:#fff;font-size:14px;font-weight:700;
  box-shadow:0 2px 8px rgba(0,0,0,.3)}
.adm-pic-del:hover{background:#991b1b}
body:not(.adm-editing) .adm-pic-del{display:none}

/* ═══════════════════════════════════════════════════════════════════════
   TEXT FORMATTING — the floating bar that appears near the caret
   ═══════════════════════════════════════════════════════════════════════ */
.adm-fmt-bar {
  position: absolute; z-index: 9250; display: none; align-items: center; gap: 3px;
  background: #1a2744; color: #fff; border-radius: 10px; padding: 6px;
  box-shadow: 0 12px 32px rgba(15, 25, 55, .35);
  font-family: var(--font-body, "Source Sans 3", sans-serif);
}
.adm-fmt-bar.adm-open { display: flex; flex-wrap: wrap; max-width: min(94vw, 560px); }
.adm-fmt-btn {
  font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; border-radius: 6px;
  min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid transparent;
  background: transparent; color: #fff; transition: background .12s ease;
}
.adm-fmt-btn:hover { background: rgba(255, 255, 255, .16); }
.adm-fmt-blockonly { display: inline-flex; gap: 3px; padding-left: 4px; margin-left: 4px; border-left: 1px solid rgba(255, 255, 255, .18); }
.adm-fmt-select {
  font: inherit; font-size: 12.5px; height: 30px; border-radius: 6px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff;
  padding: 0 6px; max-width: 108px;
}
.adm-fmt-select option { color: #1a2744; }
.adm-fmt-color {
  width: 30px; height: 30px; padding: 2px; border-radius: 6px; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .25); background: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════
   RESIZING — the "⤢ Resize" trigger and the drag handles on a section,
   card or photo. The trigger sits opposite every existing corner control
   (✕ Remove at top-right, the block × outside the top-right corner, the
   picture change/remove buttons at bottom-centre/top-right) so nothing
   already there is ever covered.
   ═══════════════════════════════════════════════════════════════════════ */
.adm-size-btn {
  position: absolute; top: 8px; left: 8px; z-index: 14;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; line-height: 1; border-radius: 20px; cursor: pointer; white-space: nowrap;
  border: 1.5px solid #fff; background: #2563eb; color: #fff;
  font-family: var(--font-body, sans-serif); font-size: 12px; font-weight: 700;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .32); opacity: .82; transition: opacity .15s ease, transform .15s ease;
}
.adm-part:hover > .adm-size-btn, .adm-block:hover > .adm-size-btn { opacity: 1; transform: scale(1.04); }
.adm-size-btn:hover { background: #1d4ed8; }
body.adm-editing .hero > .adm-size-btn { top: 84px; }
body:not(.adm-editing) .adm-size-btn { display: none; }

.adm-resize-handle { position: absolute; z-index: 13; background: transparent; }
body:not(.adm-editing) .adm-resize-handle { display: none; }
/* A thin strip at the top/bottom edge of a section or hero band. */
.adm-resize-handle--t, .adm-resize-handle--b {
  left: 0; right: 0; height: 10px; cursor: ns-resize;
}
.adm-resize-handle--t { top: 0; }
.adm-resize-handle--b { bottom: 0; }
.adm-resize-handle--t::after, .adm-resize-handle--b::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 46px; height: 4px;
  transform: translate(-50%, -50%); border-radius: 3px;
  background: rgba(37, 99, 235, .55);
}
.adm-resize-handle--t:hover::after, .adm-resize-handle--b:hover::after { background: #2563eb; }
/* A corner grip for a photo's shape or a freestanding card's width. */
.adm-resize-handle--corner {
  right: 6px; bottom: 6px; width: 18px; height: 18px; cursor: nwse-resize;
  border-radius: 4px; background: rgba(37, 99, 235, .75);
  border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
}
.adm-resize-handle--corner:hover { background: #1d4ed8; }

/* ═══════════════════════════════════════════════════════════════════════
   REORDERING SECTIONS — the drag grip and its two arrows, top-left of each
   section. Sits opposite "⤢ Resize" (top-left) by dropping below it, so the
   two never cover each other.
   ═══════════════════════════════════════════════════════════════════════ */
.adm-move {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%); z-index: 15;
  display: inline-flex; align-items: stretch; border-radius: 20px; overflow: hidden;
  border: 1.5px solid #fff; background: #0f766e; box-shadow: 0 2px 10px rgba(0, 0, 0, .32);
  opacity: .85; transition: opacity .15s ease;
}
.adm-part:hover > .adm-move { opacity: 1; }
body:not(.adm-editing) .adm-move { display: none; }
.adm-move-btn {
  font: inherit; font-size: 12px; font-weight: 700; line-height: 1; cursor: pointer;
  border: 0; background: transparent; color: #fff; padding: 6px 10px;
}
.adm-move-btn:hover { background: rgba(255, 255, 255, .2); }
.adm-move-grip {
  display: inline-flex; align-items: center; padding: 6px 12px; cursor: grab;
  font-family: var(--font-body, sans-serif); font-size: 12px; font-weight: 700; color: #fff;
  border-left: 1px solid rgba(255, 255, 255, .3); border-right: 1px solid rgba(255, 255, 255, .3);
  user-select: none; touch-action: none;   /* let the pointer drive the drag, not the scroller */
}
.adm-move-grip:active { cursor: grabbing; }
/* While a drag is running, keep the page from selecting text under the pointer. */
body.adm-dragging { user-select: none; }
body.adm-dragging .adm-drag-src { outline: 3px solid #0f766e; outline-offset: 4px; }
/* The hero's controls start below the sticky header, like the others. */
body.adm-editing .hero > .adm-move { top: 84px; }

/* Reordering cards within their row — smaller than the section control, and
   pinned bottom-left so it never lands on the section's own move box. */
.adm-cmove {
  position: absolute; bottom: 8px; left: 8px; z-index: 16;
  display: inline-flex; align-items: stretch; border-radius: 16px; overflow: hidden;
  border: 1.5px solid #fff; background: #0f766e; box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  opacity: .8; transition: opacity .15s ease;
}
.adm-part:hover > .adm-cmove, .adm-block:hover > .adm-cmove { opacity: 1; }
body:not(.adm-editing) .adm-cmove { display: none; }
.adm-cmove-btn {
  font: inherit; font-size: 11px; font-weight: 700; line-height: 1; cursor: pointer;
  border: 0; background: transparent; color: #fff; padding: 5px 8px;
}
.adm-cmove-btn:hover { background: rgba(255, 255, 255, .2); }
.adm-cmove-grip {
  display: inline-flex; align-items: center; padding: 5px 8px; cursor: grab; color: #fff;
  font-size: 12px; font-weight: 700; user-select: none; touch-action: none;
  border-left: 1px solid rgba(255, 255, 255, .3); border-right: 1px solid rgba(255, 255, 255, .3);
}
.adm-cmove-grip:active { cursor: grabbing; }

/* ═══════════════════════════════════════════════════════════════════════
   PAGE BUILDER — the widget picker, per-widget options, column add buttons
   ═══════════════════════════════════════════════════════════════════════ */
.adm-pop--wide{width:380px;max-height:78vh;overflow:auto}
.adm-wgrid{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-bottom:12px}
.adm-wpick{
  font:inherit;font-size:13px;font-weight:600;cursor:pointer;text-align:left;
  padding:10px 12px;border-radius:9px;border:1px solid var(--border,#e8e2d6);
  background:#fff;color:var(--navy,#1a2744);transition:all .12s ease;
}
.adm-wpick:hover{border-color:var(--gold,#c8a455);background:rgba(200,164,85,.12)}
.adm-wpick--tpl{border-style:dashed}

/* Per-screen value boxes: one column per breakpoint. */
.adm-bps{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.adm-bp{display:flex;flex-direction:column;gap:4px}
.adm-bp-lbl{font-size:11px;font-weight:700;color:var(--text-light,#5a5a5a);
  text-transform:uppercase;letter-spacing:.05em}
.adm-bp input[type=text]{
  font:inherit;font-size:13px;padding:7px 9px;border:1px solid var(--border,#e8e2d6);
  border-radius:8px;width:100%;box-sizing:border-box;
}
.adm-bp--check{flex-direction:row;align-items:center;gap:7px}
.adm-bp--check input{margin:0}

/* The cog on each widget, and the add button inside a column. */
.adm-wopt{
  position:absolute;top:6px;right:6px;z-index:17;width:26px;height:26px;padding:0;
  line-height:1;border-radius:50%;cursor:pointer;border:1.5px solid #fff;
  background:#4338ca;color:#fff;font-size:13px;font-weight:700;
  box-shadow:0 2px 8px rgba(0,0,0,.3);opacity:.85;
}
.adm-wopt:hover{background:#3730a3;opacity:1}
body:not(.adm-editing) .adm-wopt{display:none}
.adm-coladd{
  display:block;width:100%;margin-top:10px;padding:9px;cursor:pointer;
  font-family:var(--font-body,sans-serif);font-size:12.5px;font-weight:700;
  border:1.5px dashed var(--gold,#c8a455);border-radius:10px;
  background:rgba(200,164,85,.1);color:var(--navy,#1a2744);
}
.adm-coladd:hover{background:rgba(200,164,85,.22);border-style:solid}
body:not(.adm-editing) .adm-coladd{display:none}
/* An empty column would otherwise be invisible and impossible to aim at. */
body.adm-editing .block__col{min-height:56px;outline:1px dashed rgba(67,56,202,.35);
  outline-offset:3px;border-radius:6px}
