/* CampingVista Frontend
 * Version: 0.4H-frontend2
 */

:root {
  --bg: #0b1220;
  --panel: #0f1a2e;
  --text: #e8eefc;
  --muted: #a9b6d6;
  --border: rgba(255,255,255,0.08);
  --btn: #1e3a8a;
  --btn2: #0ea5e9;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  background: var(--bg);
  color: var(--text);
}

.topbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(15, 26, 46, 0.8);
  backdrop-filter: blur(10px);
}

.brand { display: flex; gap: 10px; align-items: center; }
.logo { font-size: 22px; }
.title { font-weight: 800; letter-spacing: 0.2px; }
.subtitle { font-size: 12px; color: var(--muted); }

.controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.controls label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--muted);
}

select, button {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

button {
  cursor: pointer;
  background: linear-gradient(135deg, var(--btn), var(--btn2));
  border: none;
  font-weight: 700;
}

/* DESKTOP layout */
.layout {
  display: grid;
  grid-template-columns: 360px 1fr;
  height: calc(100vh - 56px);
  min-height: 480px;
}

.sidebar {
  border-right: 1px solid var(--border);
  padding: 12px;
  overflow: auto;
}

.mapwrap { height: 100%; min-height: 360px; }
#map { width: 100%; height: 100%; min-height: 360px; }

.panel {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 12px;
}

.panel-title {
  font-weight: 800;
  margin-bottom: 8px;
}

.status {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
  white-space: pre-wrap;
}

.list { display: grid; gap: 8px; }

.item {
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.15);
  cursor: pointer;
}

.item:hover { background: rgba(255,255,255,0.06); }

.item .name { font-weight: 800; }
.item .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

.hint {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
}

.selected {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.4;
}

/* MOBILE fix: stack sidebar over map + give map visible height */
@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto 55vh;
    height: auto;
    min-height: 0;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    max-height: none;
    overflow: visible;
  }

  .mapwrap {
    height: 55vh;
    min-height: 55vh;
  }

  #map {
    height: 55vh;
    min-height: 55vh;
  }
}

/* Leaflet popup tweaks */
.leaflet-popup-content-wrapper { border-radius: 12px; }

/* subtitle: bold + italic */
.subtitle{
  font-weight: 700;
  font-style: italic;
}

/* ===== Header brand layout (logo boven tekst) ===== */
.header {
  display: flex;
  align-items: flex-start;
}

.header .brand,
.header .title,
.header .branding {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.header img {
  display: block;
  margin-bottom: 0.4rem;
}

.header .subtitle {
  font-style: italic;
  font-weight: 700;
  opacity: 0.9;
  margin-top: 0.2rem;
}
/* ================================================ */

/* ===== CampingVista brandstack (logo boven tekst) ===== */
.header .brandstack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:.35rem;
}

.header .brand-logo{
  display:block;
  width:64px;
  height:auto;
}

.header .brand-logo-emoji{
  font-size:56px;
  line-height:1;
}

.header .brandtext h1{
  margin:0;
}

.header .brandtext .subtitle{
  font-style:italic;
  font-weight:700;
}
/* ===== end brandstack ===== */

/* CampingVista brandstack (emoji logo above text) */
.header .brandstack{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:10px;
}
.header .brandicon{
  font-size:54px;
  line-height:1;
  margin-left:2px;
}
.header .brandtext h1{
  margin:0;
}

/* CampingVista: force logo above title (override)
   Version: 0.4H-ui-fix1
   Doel: logo/emoji/icoon boven titel + subtitle, links uitgelijnd,
         zonder de rechter controls (Radius/POI/knop) te breken.
*/
.header .brand,
.header .brand-left,
.header .brandstack,
.header .brandrow,
.header .brand-row,
.header .branding,
.header .brandarea,
.header .left,
.header .leftcol,
.header .left-col,
.header .titleblock,
.header .title-block {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 10px !important;
}

/* Als het logo een echt element is */
.header .logo,
.header .brandicon,
.header .brand-icon,
.header .icon,
.header .siteicon,
.header .site-icon,
.header .emoji,
.header .campicon,
.header .camp-icon {
  display: block !important;
  margin: 0 0 10px 0 !important;
}

/* Als het logo via ::before wordt gezet (heel vaak bij emoji/icoontjes) */
.header .brand::before,
.header .brand-left::before,
.header .branding::before,
.header .titleblock::before,
.header::before {
  display: block !important;
  position: static !important;
  margin: 0 0 10px 0 !important;
  float: none !important;
}

/* ===== CampingVista FINAL logo boven tekst ===== */
.header {
  display: flex !important;
  align-items: flex-start !important;
}

.brandstack {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 8px !important;
}

.brandicon {
  display: block !important;
  font-size: 42px !important;
  line-height: 1 !important;
  margin: 0 0 4px 0 !important;
}

.brandtext h1 {
  margin: 0 !important;
}

.subtitle {
  font-style: italic !important;
  font-weight: 700 !important;
}
/* ===== END FINAL fix ===== */

/* === PHASE2_HEADER_CLEAN_0.4H-frontend2-headerClean1 === */
.topbar .brand,
.header .brandstack,
.header .brand {
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
}

/* subtitel: wit, klein, vet+cursief */
.subtitle{
  color: #fff;
  font-weight: 700;
  font-style: italic;
  font-size: 12px;
  opacity: 0.95;
}

/* === PHASE2_PNG_LOGO_HEADER_0.4H-frontend2-headerLogoPNG1 === */
.topbar{ padding: 12px 14px; }
.cv-brand{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
}
.cv-logo{
  display:block;
  height: 52px;
  width: auto;
}
.subtitle{
  color:#fff;
  font-weight:700;
  font-style:italic;
  font-size:12px;
  opacity:0.95;
}
#map{ height: calc(100vh - 86px); }

/* === PHASE2_HEADER_SIMPLE === */
.topbar{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  align-items:center;
}
.brand{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.cv-logo{
  height:56px;
  width:auto;
}
.subtitle{
  color:#fff;
  font-weight:700;
  font-style:italic;
  font-size:12px;
}
.controls{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
}

/* === PHASE2_PANELS_MAP_BLACK === */
:root{
  --bg:#000;
  --panel:#0b1220;
  --card:#0f1a2e;
  --text:#e8eefc;
  --muted:#a9b6d6;
  --border:rgba(255,255,255,0.08);
}

html,body{
  height:100%;
  background:var(--bg);
  color:var(--text);
}

body{
  margin:0;
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

.subtitle{
  color:#fff;
  font-weight:800;
  font-style:italic;
  font-size:12px;
  line-height:1.2;
}

/* main layout: panel boven map (mobile-first) */
.cv-main{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px;
}

.cv-panel{
  display:flex;
  flex-direction:column;
  gap:12px;
}

.cv-card{
  background:rgba(15,26,46,0.85);
  border:1px solid var(--border);
  border-radius:18px;
  padding:14px;
  box-shadow:0 8px 24px rgba(0,0,0,0.35);
}

.cv-card h2{
  margin:0 0 8px 0;
  font-size:18px;
}

.cv-help{
  margin-top:10px;
  color:var(--muted);
  font-size:12px;
  line-height:1.35;
}

.cv-list > div{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--border);
  margin:10px 0;
  background:rgba(255,255,255,0.03);
}

#map.cv-map{
  width:100%;
  flex:1;
  min-height:46vh;
  border-radius:18px;
  overflow:hidden;
  border:1px solid var(--border);
}

/* desktop: panel links, map rechts */
@media (min-width: 900px){
  .cv-main{
    flex-direction:row;
    align-items:stretch;
  }
  .cv-panel{
    width:420px;
    max-height:calc(100vh - 120px);
    overflow:auto;
  }
  #map.cv-map{
    min-height:calc(100vh - 120px);
  }
}

/* === PHASE2_GRAYSCALE_UI === */
:root{
  --bg:#000;
  --panel:#0a0a0a;
  --card:#111;
  --text:#f2f2f2;
  --muted:#bdbdbd;
  --border:rgba(255,255,255,0.10);

  /* accents for buttons/icons only (still grayscale) */
  --btn:#2a2a2a;
  --btn2:#4a4a4a;
}

html,body{
  background:var(--bg) !important;
  color:var(--text) !important;
}

/* header/topbar background fully black */
header, .topbar, .header{
  background:#000 !important;
  color:var(--text) !important;
  border-bottom:1px solid var(--border) !important;
}

/* logo */
.cv-logo{
  display:block;
  max-width:220px;
  width:220px;
  height:auto;
  margin:12px 12px 6px 12px;
  border-radius:10px;
  filter: grayscale(100%) contrast(110%);
}

/* remove any leftover brand blocks spacing */
.brand, .brandstack { background: transparent !important; }

/* panels/cards should be gray */
.cv-card, .card, .panel, .sidebar, .controls, .brand{
  background:rgba(17,17,17,0.90) !important;
  border:1px solid var(--border) !important;
}

/* dropdowns/inputs grayscale */
select, input, button{
  color:var(--text) !important;
  background:rgba(28,28,28,0.95) !important;
  border:1px solid var(--border) !important;
}

/* primary button: no blue gradient */
button, #reload{
  background: linear-gradient(180deg, var(--btn2), var(--btn)) !important;
  border:1px solid rgba(255,255,255,0.18) !important;
  box-shadow: 0 8px 22px rgba(0,0,0,0.55) !important;
}
button:hover, #reload:hover{
  background: linear-gradient(180deg, #5a5a5a, #2a2a2a) !important;
}

/* titles/text */
h1,h2,.title{
  color:var(--text) !important;
}
.subtitle{ display:none !important; } /* ensure no subtitle shown */

/* === PHASE2_LOGO_TWEAK === */
header, .topbar, .header{
  background:#000 !important;
}

/* logo: center + smaller + no frame/shadow/filter */
.cv-logo{
  display:block !important;
  margin:14px auto 10px auto !important;
  width:min(220px, 78vw) !important;   /* kleiner/beter op mobiel */
  max-width:220px !important;
  height:auto !important;

  border:0 !important;
  outline:0 !important;
  box-shadow:none !important;
  background:transparent !important;

  filter:none !important;             /* haalt grijstint/contrast effect weg */
  border-radius:14px !important;      /* alleen zachte hoeken, geen kader */
}

/* Als er nog een container rond het logo een rand geeft */
.topbar, .controls, .brand, .brandstack, .header{
  box-shadow:none !important;
}
