/* DE STYLEN VOLGEN DE VOLGORDE VAN HTML ELEMENTEN IN DE DOM
        1. body
        2. menu
        3. content
        4. siedebar
        5. info panel
        6. tabs (rapporten)
        7. footer & cookies
 */


/* body */
* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Asap', sans-serif;
  overflow: auto;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
}

.wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: 1050px; /* Ensure content has a base height */
    height: 100vh;
    overflow: hidden;
  }


/* menu */
.nav-item {
  padding-right: 8px;
}
  
.navbar-nav {
  margin-left: 20px;
  font-size: 18px;
}

.navbar {
  padding: 1.5rem 1rem;
    }

.actief_menu {
color: #18407f !important;
font-weight: bold;
text-decoration: underline 3px solid #F08801;
text-underline-offset: 9px;
}


/* content */
.content-area {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
  background-color: #f8f9fa;
}


/* sidebar */
.sidebar_rapport {
  width: 60px;
  background-color: #f8f9fa;
}

.sidebar-btn-wrapper {
    width: 100%;
    padding: 5px 0;
    transition: background-color 0.3s;
    display: none;
}

.sidebar-btn-wrapper:hover {
    background-color: #ccc;
    cursor: pointer;
}
  
.sidebar-btn-wrapper.active {
    background-color: #ccc; /*#18407f;*/
    border-left: 4px solid #F08801; /* Optional: visual cue */
  }

.sidebar-btn {
    font-size: 22px;
    margin: 10px 0;
    color: #18407f; /*was: #222d49;*/
    cursor: pointer;
    text-align: center;
}


/* info-panel */
.info_panel {
    display: none;
    width: fit-content; /* Shrink-wrap to table's content */
    max-width: 1250px; /* or another sensible limit */
    min-width: 200px;  /* prevent it from being too narrow */
    color: black;
    overflow: auto;
    position: absolute;
    background-color: #f8f9fa;
    z-index: 10;
    height: 85%;
    box-shadow: 5px 5px 5px #ccc;
    border-style: solid;
    border-color: #ccc;
    border-width: 1px 1px 1px 0px;
}

.infopanel-content {
    display: none;
    padding: 20px;
}

.infopanel-content.active {
    display: block;
    width: 100%;
}

.infopanel-kaarttabel-content {
    width: auto;
    table-layout: auto; /* Allow browser to size based on content */
    font-size: 12px;
    border-collapse: collapse; /* Optional: looks cleaner */
    max-width: 100%;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    color: rgb(25, 21, 73);
    cursor: pointer;
}

.infopanel-kaarttabel-content th, .infopanel-kaarttabel-content td {
    border: 1px solid rgb(184, 184, 184);
    padding: 4px;
    text-align: center;
    white-space: normal;
    word-wrap: break-word;
    min-width: 100px;
    max-width: 300px; /* limit width of all cells */
}

.infopanel-kaarttabel-content td:first-child {
    text-align: left;
    min-width: 150px;
    max-width: 250px;
}

.infopanel-kaarttabel-content th {
    background-color: #18427c;
    color: #ffffff;
    font-weight: normal;
    padding: 7px 2px;
}


.kaarttabel-download {
    margin-bottom: 15px;
}

.btn_achtergrondkaart {
    padding: 5px;
}

.info_panel h3 {
    padding-bottom: 20px;
}

.peildatum {
    margin-top: 35px;
    padding: 5px;
    text-align: center;
}

/* tabs (rapporten) */
.main-panel {
  flex: 1;
  display: flex;
  background-color: #f8f9fa;
  flex-direction: column;
  overflow: hidden;
  min-height: 0; /* Important: allow child flex items to not overflow */

}

.tab {
    padding: 10px 15px;
    background-color: #e9ecef;
    cursor: pointer;
    color: rgba(0,0,0,0.65);
  }

.tabs {
  display: flex;
  background-color: #f8f9fa;
  overflow: hidden;
  border-bottom: 1px solid #F08801;
}

.tabs button {
    background-color: inherit;
    float: left;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 5px 20px;
    transition: 0.3s;
  }

.tabs button:hover {
    background-color: #ddd;
  }

.tabs-content {
  border: 1px solid #ccc;
  background-color: white;
  border-top: none;
  height: 100%;
  width: 100%;
  flex: 1 1 auto; /* Takes up remaining height in column */
  overflow-y: hidden;
  overflow-x: auto;
  min-height: 0;
  max-height: 900px; /*anders wordt kaart te lang*/
  }

.tabcontent {
    position: relative;
    height: 100%;
    width: 100%;
    }

.tabs button.active {
    background-color: #ccc;
  }

.deelrapport_kopje {
    position: relative;
    padding: 20px 0px 0px 20px;
  }

.deelrapport_kopje_kaart {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.7); /* semi-transparent background */
    z-index: 10;
    padding: 0px 5px 0px;
  }

.tabel_switch_linkje {
    background: none;
    border: none;
    color: rgba(0,0,0, 0.65);
    text-decoration: none;
    cursor: pointer;
    font-size: 14px;
    margin-right: 20px;
    margin-bottom:5px;
    padding: 0;
}

.tabel_switch_linkje:hover {
    color: rgba(0,0,0, 1);
}

.tabel_switch_linkje.active-button {
    text-decoration: underline 2px solid #F08801;
    font-weight: bold;
    color: #18407f;
}

.table_switch_container{
margin: 0px 0px 12px 15px;
}

.download-url-box{
    position: absolute;
    background-color: white;
    border: 1px solid #ccc;
    padding: 6px 8px;
    margin-top: 5px;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    min-width: 350px;
}

.download-url-box .url-input {
  flex-grow: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 0.9rem;
}

.download-url-box input:focus {
  outline: none;
}

.download-url-box .copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.download-url-box .copy-btn:hover {
    background-color: #6c757d;
    color: white;
  }

.tabel_laden{
    margin-top: 70px;
}

.spinner {
  margin: 20px auto;
  width: 24px;
  height: 24px;
  border: 4px solid #ccc;
  border-top: 4px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {transform: rotate(360deg);}
}

.laden_tekst{
  text-align: center;
  color: #007bff;
  font-size: 14px;
}

.foutmelding_container {
  margin-top: 30px;
}

.retry_button {
  margin-top: 20px;
}

.tijdreeks_tabel,
.tijdreeks_tabel tr,
.tijdreeks_tabel th,
.tijdreeks_tabel td {
  all: unset; /* alle stylen mbt tabellen verwijderen */
}

.tijdreeks_tabel {
  display: table;
  border-collapse: collapse;
}

.tijdreeks_tabel tr {
  display: table-row;
}

.tijdreeks_tabel th,
.tijdreeks_tabel td {
  display: table-cell;
  padding: 1px;
  border: 4px solid white;
  border-radius: 5px;
  font-size: 12px;
  min-width: 17px;
  text-align:center;
  color: rgba(0,0,0, 0.75);
}

.tijdreeks_tabel td:first-child {
  padding-right: 10px;
}

.tijdreeks_tabel td.groen {
  background-color: rgba(0, 164, 0, 1);
  color: white;
}

.tijdreeks_tabel td.blauw {
  background-color: rgba(0, 120, 164, 1);
  color: white;
}

.tijdreeks_tabel td.paars {
  background-color: rgba(72, 2, 82, 1);
  color: white;
}

.tijdreeks_tabel td.grijs_maand {
  background-color: #d8d8d8;
}

.tijdreeks_tabel td.vandaag {
  color: #0053c9;
  text-decoration: underline;
  text-decoration-color: #0053c9;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.tijdreeks_tabel td.groen:hover,
.tijdreeks_tabel td.blauw:hover,
.tijdreeks_tabel td.paars:hover {
    background-color: #F08801;
    cursor: pointer;
}


/* footer en cookies */
.footer {
  flex-shrink: 0;
  background-color: #f8f9fa;
  padding: 5px;
}

.footer p {
    font-size: 10px;
    margin: 2px;
  }

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #222;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 99;
}

.cookie-banner button {
  background-color: #555;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
}
