/* Minh AI Maps — content add-in for presentations (prototype p0.1.0) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #0d1b2a;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; color: #10233a; }
/* the add-in can be small in edit view and full-slide in slide show: sizes follow the frame width */
body { font-size: clamp(11px, 1.55vw, 22px); }
#map { position: absolute; inset: 0; }
.hidden { display: none !important; }
body.read .edit-only { display: none !important; }

button { font: inherit; font-size: .85em; border: 0; border-radius: .5em; padding: .45em .8em; cursor: pointer;
  background: rgba(255,255,255,.94); color: #10233a; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
button:hover { background: #fff; }
button.primary { background: #0f766e; color: #fff; font-weight: 600; }
button.primary:hover { background: #115e59; }

.ctrl { position: absolute; left: 50%; bottom: 1.1em; transform: translateX(-50%); display: flex; gap: .45em; z-index: 5; }

.tools { position: absolute; top: .7em; left: .7em; display: flex; gap: .4em; z-index: 5; }

.badge { position: absolute; right: .6em; bottom: .5em; z-index: 4; font-size: .62em; color: rgba(255,255,255,.9);
  background: rgba(13,27,42,.55); padding: .2em .55em; border-radius: .4em; pointer-events: none; }

.card { position: absolute; top: 1em; right: 1em; width: min(40%, 23em); z-index: 6;
  background: rgba(255,255,255,.96); border-radius: .8em; padding: .9em 1.05em 1em;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); border-left: .35em solid var(--accent, #0f766e);
  animation: cardIn .45s ease-out; }
@keyframes cardIn { from { opacity: 0; transform: translateY(-.6em); } to { opacity: 1; transform: none; } }
.card-step { font-size: .7em; letter-spacing: .08em; text-transform: uppercase; color: #5b6b7d; }
.card-title { font-size: 1.15em; font-weight: 700; margin: .1em 0 .45em; }
.card-kpi { display: flex; align-items: baseline; gap: .45em; margin-bottom: .55em; }
.card-kpi #cardKpiValue { font-size: 2em; font-weight: 800; color: var(--accent, #0f766e); line-height: 1; }
.card-kpi #cardKpiLabel { font-size: .8em; color: #34495e; }
.card-row { display: grid; grid-template-columns: 6.6em 1fr; gap: .5em; font-size: .8em; padding: .35em 0;
  border-top: 1px solid #e5e9ef; }
.card-row b { color: #5b6b7d; font-weight: 600; }
.card-row.prop span { font-weight: 600; color: #0f3d3a; }

.panel { position: absolute; top: 3.2em; left: .7em; width: min(92%, 30em); max-height: calc(100% - 4.5em); overflow: auto;
  z-index: 8; background: #fff; border-radius: .7em; box-shadow: 0 10px 30px rgba(0,0,0,.35); font-size: .8em; }
.panel-head { position: sticky; top: 0; background: #fff; display: flex; justify-content: space-between; align-items: center;
  padding: .7em .9em; border-bottom: 1px solid #e5e9ef; }
.panel-head button { box-shadow: none; padding: .2em .5em; }
#panelBody { padding: .8em .9em 1em; }
#panelBody p { margin: .3em 0 .7em; line-height: 1.4; }
#panelBody textarea { width: 100%; height: 11em; font: 12px/1.4 Consolas, monospace; border: 1px solid #cfd7e1; border-radius: .4em; padding: .5em; }
#panelBody .row { display: flex; gap: .5em; margin-top: .6em; flex-wrap: wrap; }
#panelBody table { border-collapse: collapse; width: 100%; font-size: .95em; }
#panelBody td { padding: .25em .4em; border-bottom: 1px solid #eef1f5; vertical-align: top; }
#panelBody td:first-child { color: #5b6b7d; white-space: nowrap; }
.ok { color: #0f766e; font-weight: 600; } .ko { color: #b42318; font-weight: 600; }

.toast { position: absolute; left: 50%; top: .8em; transform: translateX(-50%); z-index: 9; background: #10233a; color: #fff;
  padding: .5em .9em; border-radius: .5em; font-size: .8em; box-shadow: 0 4px 14px rgba(0,0,0,.3); max-width: 90%; }

.maplibregl-ctrl-attrib { font-size: 10px; }
