* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; font-family: system-ui, -apple-system, sans-serif; font-size: 14px; }
#map { position: absolute; inset: 0; }

/* OpenLayers zoom-knoppen styling voor mobiel uitlijning */
.ol-zoom { top: 10px; left: 10px; z-index: 1001; }

.paneel {
    position: absolute; z-index: 1000; background: #fff; padding: 12px;
    border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.25);
    max-height: calc(100% - 140px); overflow-y: auto; -webkit-overflow-scrolling: touch;
}
#bediening { top: 10px; left: 56px; width: 320px; }
#info { top: 10px; right: 10px; width: 310px; }
h3 { margin: 0 0 8px; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
h4 { margin: 12px 0 6px; font-size: 13px; }

.tabs { display: flex; gap: 4px; margin-bottom: 10px; }
.tabs button { flex: 1; padding: 8px 6px; border: 1px solid #ccc; background: #f4f4f4; border-radius: 6px; cursor: pointer; font-weight: 500; }
.tabs button.actief { background: #2c3e50; color: #fff; border-color: #2c3e50; }

input[type=text], input[type=number] { width: 100%; padding: 8px; border: 1px solid #bbb; border-radius: 6px; font-size: 14px; }
button.knop { padding: 8px 10px; border: 1px solid #bbb; background: #f4f4f4; border-radius: 6px; cursor: pointer; font-size: 13px; min-height: 36px; }
button.knop:hover { background: #e8e8e8; }
button.knop:disabled { opacity: .6; cursor: default; }
button.knop.primair { background: #2c3e50; color: #fff; border-color: #2c3e50; }
button.knop.actief { background: #f39c12; border-color: #f39c12; color: #fff; }
button.knop.mini { min-height: 24px; padding: 2px 8px; font-size: 12px; }
.rij { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; align-items: center; }
.klein { font-size: 12px; color: #666; margin-top: 6px; line-height: 1.4; }

#adresLijst { list-style: none; margin: 8px 0 0; padding: 0; max-height: 150px; overflow-y: auto; }
#adresLijst li { padding: 8px 6px; border-bottom: 1px solid #eee; cursor: pointer; font-size: 13px; }
#adresLijst li:hover { background: #f0f6ff; }

.gevel-item { display: grid; grid-template-columns: 20px 36px 1fr; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px solid #eee; }
.kleurblok { width: 20px; height: 20px; border-radius: 3px; border: 1px solid #ccc; display: inline-block; }
.richting { font-weight: bold; }
.balk { height: 5px; background: #eee; border-radius: 3px; margin-top: 3px; }
.balk > div { height: 100%; border-radius: 3px; }
table.windr { width: 100%; border-collapse: collapse; font-size: 13px; }
table.windr td { padding: 3px 4px; }
.fout { color: #c0392b; }

/* Energielabel-badges en lijst met verblijfsobjecten */
.badge { display: inline-block; font-weight: bold; padding: 1px 8px; border-radius: 4px; font-size: 13px; }
.badge.geen { background: #eee; color: #777; }
.vbo-lijst { max-height: 220px; overflow-y: auto; border: 1px solid #eee; border-radius: 6px; margin-top: 6px; }
.vbo-rij { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; padding: 5px 6px; border-bottom: 1px solid #eee; font-size: 13px; }
.vbo-rij:last-child { border-bottom: none; }
.vbo-rij.gekozen { background: #eef5ff; }

/* Screenshot-weergave */
#shotView { position: absolute; inset: 0; z-index: 500; background: #222; }
#shotScroll { position: absolute; inset: 0; overflow: auto; padding: 10px 340px 10px 400px; }
#shotCanvas { display: block; background: #fff; cursor: crosshair; }
#shotLeeg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #bbb; text-align: center; padding: 0 400px; pointer-events: none; }
[hidden] { display: none !important; }

/* Toggle knop voor info-paneel inklappen op mobiel */
.toggle-btn { display: none; background: none; border: none; font-size: 16px; cursor: pointer; padding: 0 4px; color: #555; }

/* ============================================================
   Responsive / Mobiel instellingen (< 768px)
   ============================================================ */
@media (max-width: 767px) {
    .ol-zoom { top: 68px; left: 10px; }

    #bediening {
        top: 10px; left: 10px; right: 10px; width: auto;
        max-height: 45vh;
    }

    #info {
        top: auto; bottom: 10px; left: 10px; right: 10px; width: auto;
        max-height: 40vh;
    }

    .toggle-btn { display: inline-block; }
    .klapt-in.ingeklapt > :not(h3) { display: none !important; }

    #shotScroll { padding: 180px 10px 180px 10px; }
    #shotLeeg { padding: 0 20px; }
}

/* Luchtfoto-vergelijking (swipe) */
#splitHandle { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; z-index: 900; border-left: 3px solid #fff;
               box-shadow: 0 0 4px rgba(0,0,0,.6); pointer-events: none; }
#splitHandle .splitGreep { position: absolute; top: 50%; left: -19px; width: 36px; height: 36px; margin-top: -18px; border-radius: 50%;
               background: #fff; border: 2px solid #2c3e50; display: flex; align-items: center; justify-content: center;
               font-size: 16px; cursor: ew-resize; pointer-events: auto; touch-action: none; user-select: none; }
#splitHandle .splitTxt { position: absolute; top: calc(50% + 28px); background: rgba(44,62,80,.85); color: #fff; font-size: 12px;
               padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
#splitHandle .l { right: 8px; }
#splitHandle .r { left: 8px; }

/* Auteursrecht-vermelding */
#copyright { position: absolute; z-index: 1100; left: 10px; bottom: 0; font-size: 11px; line-height: 14px; color: #333;
               background: rgba(255,255,255,.8); padding: 0 6px; border-radius: 4px 4px 0 0; pointer-events: none; }
