label {
  width: 60px;
  display: inline-block;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-family: Arial, sans-serif;
    font-size: 14px;
    table-layout: fixed;
    overflow-x: auto; 
    display: block;   
}

thead th {
    background-color: #f0f0f0;
    border-bottom: 2px solid #ccc;
    padding: 8px;
    text-align: left;
}
table th:first-child,
table td:first-child {
    width: 20px;     /* of 50px, wat je wilt */
    text-align: right;
    white-space: nowrap; 
}

tbody td {
    border-bottom: 1px solid #ddd;
    padding: 6px 8px;
}

/* Zebra rows */
tbody tr:nth-child(even) {
    background-color: #fafafa;
}

/* Highlight row on hover */
tbody tr:hover {
    background-color: #f1f1f1;
    cursor: default;
}

/* Optional: small number column like your example */
tbody tr td:first-child {
    width: 40px;
    text-align: right;
    color: #555;
}


/* --- Zoekveld en X-knop --- */
.search-wrapper {
  position: relative;
  width: 100%;
  max-width: 500px;
  margin: 10px 0;
}

.search-box {
  width: 100%;
  border: 1px solid #ccc;
  outline: 0;
  padding: 8px 30px 8px 10px; /* ruimte rechts voor X-knop */
  box-sizing: border-box;
  font-size: 1rem;
}

.search-box:focus {
  border: 2px solid #bebede;
}

/* X-knop netjes gecentreerd en zwevend */
.close-icon {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-10%); /* iets minder dan -50% voor visuele centrering */
  width: 24px;
  height: 24px;
  background-color: gray;
  color: white;
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  z-index: 10;
  display: none;
  font-family: Arial, sans-serif;
  padding: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Popup venster */
/* Popup venster */
#popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    height: auto;
    max-height: 75vh;
    background: white;
    box-shadow: 0 0 15px rgba(0,0,0,0.3);
    border-radius: 8px;
    z-index: 1000;
    font-family: Arial, sans-serif;
    overflow: auto;
    box-sizing: border-box; /* Belangrijk! */
}

/* Header met sluitknop */
#popup-header {
    position: relative;
    background: #f0f0f0;
    padding: 10px 16px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: space-between; /* This pushes items to opposite ends */
    width: 100%;
    box-sizing: border-box;
}

#popup-header-title {
    font-weight: bold;
    /* Remove flex: 1 if it causes issues */
}

#popup-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    margin-left: auto; /* This pushes the button to the far right */
    line-height: 1;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

/* Popup-body */
#popup-body {
    padding: 15px;
    overflow-y: auto;
}

/* Achtergrond overlay */
#popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 999;
}

/* Responsieve lay-out */
@media screen and (max-width: 768px) {
    label {
        display: block;
        margin-bottom: 5px;
    }

    select,
    button {
        width: 100%;
        font-size: 1rem;
        padding: 10px;
        margin-bottom: 10px;
    }

    .search-wrapper {
        margin: 10px auto;
    }

    .search-box {
        font-size: 1rem;
    }

    #popup-close {
        font-size: 18px;
    }
}

