/* ===== DESP Header & Footer (per ESA visual guidelines) ===== */
.desp-header, .desp-footer {
  background-color: #0D1527;  /* ESA-compliant dark blue */
  color: #fff;
}

.desp-header {
  height: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  z-index: 1030;
}

.desp-footer {
  border-top: 1px solid rgba(255,255,255,0.1);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
}

body {
  padding-bottom: 48px; /* leave space for footer */
}

/* --- Palette & base --- */
:root{
  --bg:#f6f7fb;
  --panel:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --border:#e6e8ee;
  --brand:#0ea5e9;
  --radius:16px;
  --shadow:0 1px 2px rgba(2,6,23,.06), 0 10px 30px rgba(2,6,23,.08);
}
@media (prefers-color-scheme:dark){
  :root{
    --bg:#0b1220; --panel:#0f172a; --text:#e2e8f0; --muted:#9aa6b2; --border:#1f2937; --brand:#38bdf8;
  }
}
html,body{height:100%;background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial}

/* --- Topbar --- */
.topbar{
  height:56px;background:rgba(255,255,255,.6);
  border-bottom:1px solid var(--border);
  backdrop-filter:saturate(1.2) blur(8px);
}
.brand{font-weight:700;letter-spacing:.2px}
.brand-icon{font-size:1.25rem;color:var(--brand)}
.soft{border-radius:999px}

/* --- Three-pane grid layout --- */
.layout{
  display:grid;
  grid-template-columns: 
    minmax(260px, 380px)   
    1fr                  
    minmax(260px, 360px);
  gap:16px;
  padding:16px;
  height: calc(100vh - var(--header-h) - var(--footer-h));
  box-sizing:border-box;
}
.btn-group {
  display: flex;
  flex-wrap: nowrap;
}

.btn-group .btn {
  white-space: nowrap;
}


.order-actions {
  display: flex;
  gap: 8px;
}

.order-actions a {
  flex: 1;                  
  text-align: center;
}

.order-actions a {
  background: #f3f4f6;
  border-radius: 20px;
  padding: 8px 10px;
  font-size: 0.82rem;
  color: #333;
  text-decoration: none;
}

.order-actions a:hover {
  background: #e5e7eb;
}

.action-primary {
  background: #0d6efd;
  color: white;
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 0.85rem;
}

.action-primary:hover {
  background: #0b5ed7;
  color: white;
}

.download-group {
  display: flex;
  gap: 6px;
}

.action-download {
  background: #f1f3f5;
  border-radius: 50px;
  padding: 6px 10px;
  font-size: 0.8rem;
  color: #333;
  text-decoration: none;
}

.action-download:hover {
  background: #e2e6ea;
}


.panel{
  display:flex; flex-direction:column;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:16px;
  min-height:0; /* allow children to size properly in grid */
}
.panel-title{
  font-weight:700; margin-bottom:12px; color:var(--text);
}

/* --- Map panel --- */
.panel--map{ padding:12px }
#map{
  flex:1 1 auto;
  height:100%; min-height:420px;
  border:1px solid var(--border);
  border-radius:calc(var(--radius) - 6px);
  background:var(--panel);
}

/* Buttons & forms */
.form-label{color:var(--muted);font-weight:600;font-size:.9rem}
.btn-primary{background:var(--brand);border-color:var(--brand);border-radius:999px}
.btn-primary:hover{filter:brightness(.96)}
.btn-outline-secondary{border-radius:999px}

/* Legend */
.legend{margin:0;padding:0}
.legend li{display:flex;align-items:center;gap:.5rem;margin:.25rem 0;color:var(--muted)}
.legend-dot{font-size:.7rem;color:var(--brand)}

/* Scrollbars (subtle) */
.panel{overflow:auto}
::-webkit-scrollbar{width:10px;height:10px}
::-webkit-scrollbar-thumb{background:var(--border);border-radius:999px}
::-webkit-scrollbar-track{background:transparent}

/* Leaflet niceties */
.leaflet-control{border-radius:10px !important}

.ol-control { border-radius: 10px !important; }


.topbar.desp-header{
  background: #0D1527 !important;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: none; /* remove the milky look */
}
.topbar.desp-header .brand,
.topbar.desp-header a{ color:#fff !important; }
.topbar.desp-header .btn.btn-light{ 
  background:#fff; color:#0D1527; border:0;
}

:root{
  --header-h: 56px;
  --footer-h: 40px;
}

.layout{
  height: calc(100vh - var(--header-h) - var(--footer-h));
}

/* keep footer fixed */
.desp-footer{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--footer-h);
}

body{ padding-bottom: 0; }

.panel--map {
  position: relative;
}

#predictionPanel {
  position: absolute;
  top: 15px;
  right: 15px;

  z-index: 9999;
  background: white;
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 260px;

  border: 1px solid #ddd;
  box-shadow: 0 10px 25px rgba(0,0,0,.12);
}


.hero-section {
  background-image: url("/static/img/conops_banner.png");
  background-size: cover;
  background-position: center;
  min-height: 420px;
  border-radius: 0 0 8px 8px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,0,0,.75), rgba(0,0,0,.45));
  border-radius: 0 0 8px 8px;
}


.filter-badge {
  cursor: pointer;
  padding: 6px 10px;
  font-size: 0.72rem;
}

.filter-badge.active {
  outline: 2px solid rgba(0,0,0,.15);
  box-shadow: 0 0 8px rgba(0,0,0,.15);
}

#desp-header-container {
  z-index: 2000 !important;
}

/* Ensure dropdown is above header */
#user-frame {
  position: absolute !important;
  z-index: 3000 !important;
  pointer-events: auto !important;
}

/* Prevent parent containers from clipping dropdown */
#desp-header-inner-container,
#right-container,
#user-container {
  overflow: visible !important;
}