/* Toumaï Maps -- editor side panel, "style 1" chosen by the owner on
   13/10/2026: navy panel, yellow section labels, site colours and font.
   Loaded after the page's own styles; only the panel and the quote dialog
   change -- the map sheet keeps its fonts, so the exported maps are the
   same as before. */
@font-face { font-family: "Rubik"; src: url("fonts/rubik-latin.woff2") format("woff2"); font-weight: 300 900; font-display: swap; }
:root {
  --navy: #1e3a8a;
  --navy-dark: #172554;
  --yellow: #eab308;
  --green: #2a8150; /* was #2e8b57: white text reaches 4.5:1 (audit 17/11/2026) */
}
#app { grid-template-columns: 330px 1fr; }
#sidebar, #request-dialog { font-family: "Rubik", "Rubik Fallback", system-ui, sans-serif; }

#sidebar { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%); color: #fff; border-right: 0; }
#sidebar h1 { color: #fff; border: 0; font-size: 19px; font-weight: 600; display: flex; align-items: center; gap: 10px; padding: 0; }
#sidebar h1::before { content: ""; width: 38px; height: 38px; border-radius: 10px; flex: none; background: url("favicon.svg") center / cover; box-shadow: 0 0 0 2px rgba(255,255,255,.18); }
#sidebar .subtitle { color: #c7d2fe; margin: 2px 0 10px 48px; }
#sidebar .site-links a { color: #fde047; }
#sidebar fieldset { border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); border-radius: 14px; padding: 12px 16px 14px; }
#sidebar legend { color: var(--navy-dark); background: var(--yellow); border-radius: 999px; padding: 3px 12px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
#sidebar label { color: #fff; }
#sidebar .field-label { color: #c7d2fe; }
#sidebar select, #sidebar input[type="text"] { border: 0; border-radius: 9px; padding: 9px 10px; font-size: 14px; }
#sidebar select:disabled { background: rgba(255,255,255,.75); }
#sidebar .swatch { box-shadow: 0 0 0 1px rgba(255,255,255,.35); }

/* buttons */
#export-btn, #export-hd-btn { border-radius: 9px; padding: 12px; font-size: 14.5px; font-weight: 500; }
#export-btn { background: var(--yellow); color: var(--navy-dark); }
#export-btn:hover { background: #fde047; }
#export-hd-btn { background: var(--green); }
#request-open-btn, #reset-layout-btn, #label-adjust-btn {
  background: rgba(255,255,255,.1); color: #fff; border: 1px dashed rgba(255,255,255,.45); border-radius: 9px;
}
#request-open-btn:hover, #reset-layout-btn:hover, #label-adjust-btn:hover { background: rgba(255,255,255,.18); }
#label-adjust-btn.active { background: var(--yellow); border-color: var(--yellow); color: var(--navy-dark); }
#label-adjust-reset, #recover-open-btn { color: #fde047; }
#promo-note { background: rgba(234,179,8,.18); color: #fde68a; border: 1px solid rgba(234,179,8,.6); }
#export-status { color: #e0e7ff; }
#recover-form button { border: 0; border-radius: 8px; background: var(--yellow); color: var(--navy-dark); font-weight: 600; }
#recover-ref { border: 0; border-radius: 8px; }

/* Map area: navy work table, the sheet lies on it (owner, 13/10) */
#stage { background: radial-gradient(circle at 50% 40%, #2a4799 0%, #14214f 75%); }
#map { box-shadow: 0 22px 60px rgba(0,0,0,.6); }
#layers-box[hidden] { display: none; }

/* Quote form: a clear way back to the map, top right */
#request-dialog { position: relative; padding-top: 22px; }
#request-dialog h2 { padding-right: 44px; }
#request-close-x {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 0; background: #eef2f8; color: var(--navy-dark); font-size: 17px; line-height: 1; cursor: pointer;
}
#request-close-x:hover { background: var(--yellow); }

/* Phones: the panel sits under the map preview */
@media (max-width: 760px) {
  #app { grid-template-columns: none; }
}

/* FR | عربي switch (03/11/2026): the active language on a light background */
#sidebar .lang-switch { display: inline-flex; margin: 8px 0 2px; border: 2px solid #fde047; border-radius: 8px; overflow: hidden; font-weight: 700; font-size: 13px; direction: ltr; }
#sidebar .lang-switch a { padding: 3px 12px; color: #fde047; text-decoration: none; line-height: 1.4; }
#sidebar .lang-switch a.on { background: #fde047; color: #172554; }

/* 17/11/2026 design review ------------------------------------------------ */
/* the buttons that earn money stay visible at the bottom of the panel */
#sidebar .export-actions { position: sticky; bottom: -20px; z-index: 5; margin: 12px -20px -20px; padding: 12px 20px 16px;
  background: linear-gradient(180deg, rgba(23,37,84,.92), var(--navy-dark)); border-top: 1px solid rgba(255,255,255,.14); box-shadow: 0 -10px 24px rgba(0,0,0,.25); }
.pay-badges { display: flex; gap: 6px; justify-content: center; margin-top: 8px; }
.pay-badges span { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.25); }
/* panel head = the site's header look */
#sidebar h1 .side-brand { color: inherit; text-decoration: none; }
#sidebar h1 .side-brand:hover { color: #fde047; }
/* phones: full-screen preview */
#preview-zoom-btn { display: none; }
@media (max-width: 760px) {
  #sidebar .export-actions { bottom: 0; margin: 10px -16px 0; }
  #preview-zoom-btn { display: block; position: absolute; z-index: 20; right: 8px; bottom: 8px; padding: 7px 12px; border: 0; border-radius: 999px;
    background: var(--yellow); color: var(--navy-dark); font: 600 13px/1 "Rubik", "Rubik Fallback", sans-serif; box-shadow: 0 3px 10px rgba(0,0,0,.3); }
  body.preview-full #stage { position: fixed; inset: 0; height: 100vh; height: 100svh; z-index: 60; }
  body.preview-full { overflow: hidden; }
}
#export-status:empty { display: none; }

/* student price (19/11/2026) */
#student-box { margin: 4px 0 10px; padding: 10px 12px; border-radius: 10px; background: rgba(240,180,0,.12); border: 1px solid rgba(240,180,0,.45); }
#student-box .student-line { color: #fde047; font-weight: 600; padding: 0; }
#student-fields { margin-top: 8px; }
