/* Editing tools on New master (edit-tools.js, edit-mark.js, edit-review.js, edit-units.js): New master's panel tokens (base.css).
   One accent per job: the main action is filled accent; danger is a quiet red outline. */
.et-bar {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 6; width: min(640px, calc(100% - 32px)); box-sizing: border-box;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(6px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); padding: 10px 12px; font-size: 13px;
}
.et-bar[hidden] { display: none; }
.ed-slot > .et-bar { position: static; transform: none; width: 100%; background: none; border: 0; box-shadow: none; backdrop-filter: none; padding: 2px 0 0; } /* inside the foundation's edit bar */
.et-t { font-weight: 700; font-size: 13.5px; }
.et-h { color: var(--soft); font-size: 12px; line-height: 1.4; margin-top: 3px; }
.et-n { font-size: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--soft); }
.et-n:empty { display: none; }
.et-n.warn { color: #facc15; }
.et-n.bad { color: #fca5a5; font-weight: 600; }
.et-b { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.et-bar button, .et-card button, .et-units button, .et-mark button, .et-ask button {
  background: transparent; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; padding: 6px 10px; font: inherit; font-size: 12.5px; cursor: pointer; min-height: 32px;
}
.et-bar button:hover:not(:disabled), .et-card button:hover, .et-units button:hover, .et-mark button:hover, .et-ask button:hover:not(:disabled) { border-color: var(--accent); }
.et-bar button:disabled, .et-ask button:disabled, .et-units button:disabled { opacity: 0.45; cursor: default; }
.et-bar .save, .et-card .ok, .et-units .ok, .et-ask .ok { background: var(--accent); border-color: var(--accent); color: #1b1712; font-weight: 600; }
.et-bar .on { border-color: var(--accent); color: var(--accent); }
.et-bar .found { text-align: left; }
.et-card .danger, .et-units .danger, .et-ask .danger { border-color: rgba(252, 165, 165, 0.5); color: #fca5a5; }
.et-name { display: block; width: 100%; box-sizing: border-box; margin-top: 6px; background: rgba(246, 234, 210, 0.07); border: 1px solid var(--line); border-radius: 7px; color: var(--ink); font: inherit; font-size: 13px; padding: 7px 9px; }
.et-name:focus { outline: 0; border-color: var(--accent); }
body.et-editing #place { opacity: 0.94; }

/* questions in a box on the map */
.et-ask { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(0, 0, 0, 0.35); padding: 16px; }
.et-ask-in { width: min(380px, 100%); box-sizing: border-box; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 14px; box-shadow: 0 10px 36px rgba(0, 0, 0, 0.5); font-size: 13px; }
.et-ask-in b { font-size: 14px; }
.et-ask-in p { color: var(--soft); line-height: 1.45; margin: 6px 0 0; }
.et-ask-in p b { color: var(--ink); font-size: inherit; }
.et-ask-f { display: block; width: 100%; box-sizing: border-box; margin-top: 10px; background: rgba(246, 234, 210, 0.07); border: 1px solid var(--line); border-radius: 7px; color: var(--ink); font: inherit; padding: 8px 9px; }
.et-ask-f:focus { outline: 0; border-color: var(--accent); }
.et-ask-b { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* the small message */
.et-toast { position: fixed; left: 50%; top: 14px; transform: translate(-50%, -8px); z-index: 21; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; font-size: 13px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4); opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; max-width: calc(100% - 32px); }
.et-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Mark: the Add a place button and box */
.et-markbtn { position: absolute; left: 12px; bottom: 16px; z-index: 5; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 9px; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35); }
.et-markbtn:hover, .et-markbtn.on { border-color: var(--accent); color: var(--accent); }
body.et-editing .et-markbtn { display: none; }
.et-mark { position: absolute; left: 12px; bottom: 60px; z-index: 6; width: 320px; max-height: min(520px, calc(100% - 90px)); overflow: auto; box-sizing: border-box;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(6px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); padding: 10px 12px; font-size: 13px; }
.et-mark[hidden] { display: none; }
.et-mark header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.et-mark .et-x { border: 0; font-size: 18px; padding: 0 4px; min-height: 0; color: var(--soft); }
#etMarkQ { width: 100%; box-sizing: border-box; background: rgba(246, 234, 210, 0.07); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); font: inherit; padding: 7px 9px; }
#etMarkQ:focus { outline: 0; border-color: var(--accent); }
.et-list { margin-top: 6px; }
.et-hit button { display: block; width: 100%; text-align: left; border: 0; border-radius: 6px; padding: 6px; min-height: 0; }
.et-hit button:hover { background: rgba(230, 182, 115, 0.14); }
.et-hit b { display: block; font-weight: 600; }
.et-hit small, .et-sub, .et-mark small { color: var(--soft); font-size: 11.5px; line-height: 1.4; }
.et-sub { margin: 4px 0; }
.et-sub.foot { margin-top: 10px; }
.et-row2 { display: flex; gap: 6px; margin: 6px 0; flex-wrap: wrap; }
.et-more { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }

/* a border not in Intelligence yet: its own small card (edit-review.js) */
.et-bcard { position: absolute; right: 60px; top: 60px; z-index: 6; width: 300px; max-height: calc(100% - 140px); overflow: auto; box-sizing: border-box;
  background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; backdrop-filter: blur(6px); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45); padding: 10px 12px; font-size: 13px; }
.et-bcard[hidden] { display: none; }
.et-bcard header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.et-bcard .et-x { background: none; border: 0; color: var(--soft); font-size: 18px; cursor: pointer; padding: 0 4px; }
body.et-editing .et-bcard { display: none; }

/* the place card: editing block, proposals, review queue, units */
.et-card, .et-units { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.et-block + .et-block { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.et-state { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.et-state small, .et-sec { color: var(--soft); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.et-sec { margin: 10px 0 4px; }
.et-lock { font-weight: 600; text-align: right; }
.et-lock.approved { color: #86efac; }
.et-lock.redo { color: #fca5a5; }
.et-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.et-far { margin-top: 8px; }
.et-far button { font-size: 12px; padding: 4px 8px; min-height: 28px; }
.et-prop { border: 1px dashed rgba(255, 255, 255, 0.55); border-radius: 8px; padding: 7px 9px; margin-bottom: 8px; font-size: 12px; }
.et-prop b { display: block; color: #fcd34d; }
.et-prop span { color: var(--soft); }
.et-queue { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: rgba(230, 182, 115, 0.1); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 10px; font-size: 12.5px; }
.et-queue .et-row { margin: 0; flex-wrap: nowrap; }
.et-queue button { min-height: 28px; padding: 3px 9px; }
.et-tag { font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--c) 22%, transparent); color: color-mix(in srgb, var(--c) 70%, #fff); white-space: nowrap; }
.et-unit { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin: 6px 0; }
.et-warn { color: #facc15; font-size: 12px; margin: 4px 0; }
.et-ulist { list-style: none; margin: 6px 0 0; padding: 0; max-height: 260px; overflow: auto; }
.et-ulist button { display: flex; justify-content: space-between; gap: 8px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; min-height: 30px; padding: 5px 2px; }
.et-ulist button.on { color: var(--accent); }

/* phone: the bar sits above the bottom sheet; Add a place moves up out of the way */
@media (max-width: 600px) {
  .et-bar { bottom: calc(48% + 8px); padding: 8px 10px; }
  .et-b button { padding: 6px 8px; min-height: 36px; }
  .et-markbtn { bottom: 64px; left: 12px; } /* level with the Edit button (edit.css); the panel fills the top on phones */
  .et-mark { left: 12px; right: 12px; width: auto; bottom: 112px; max-height: 55vh; }
  .et-card button, .et-units button { min-height: 38px; }
  .et-bcard { left: 12px; right: 12px; width: auto; top: auto; bottom: 112px; max-height: 50vh; }
}
