/* Settings Button */
#settings-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

#settings-button:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

/* Settings Overlay */
#settings-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 370px;
    background-color: rgba(30, 30, 30, 0.95);
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    transform: translateX(100%);
    overflow-y: auto;
}

#settings-overlay.visible {
    transform: translateX(0);
}

#settings-overlay.hidden {
    transform: translateX(100%);
}

.settings-container {
    padding: 20px;
    color: white;
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.settings-header h2 {
    margin: 0;
    font-size: 18px;
}

#close-settings {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

#close-settings:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Tabel layout voor filters */
.filter-table-container {
  margin-bottom: 20px;
  max-height: 60vh;
  overflow-y: auto;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.15);
}

.filter-table {
  width: 100%;
  border-collapse: collapse;
  color: white;
}

.filter-table thead {
  position: sticky;
  top: 0;
  background-color: rgba(30, 30, 30, 0.95);
  z-index: 1;
}

.filter-table th {
  padding: 10px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.filter-table th:first-child {
  width: 40%; /* Aangepast om ruimte te maken voor push kolom */
}

.filter-table th:not(:first-child) {
  width: 20%;
  text-align: center;
}

.filter-table td {
  padding: 8px 10px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.filter-table td:not(:first-child) {
  text-align: center;
}

/* Category rows */
.filter-table tr.filter-category {
  background-color: rgba(0, 0, 0, 0.3);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9em;
  letter-spacing: 0.05em;
}

.filter-table tr.filter-category td {
  padding: 8px 10px;
}

/* Divider row - verbeterde scheidingslijn tussen categorieën */
.filter-table tr.filter-divider td {
  padding: 0;
  height: 10px;
  background-color: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hover effect voor rijen */
.filter-table tr:not(.filter-category):not(.filter-divider):hover {
  background-color: rgba(255, 255, 255, 0.05);
}

/* Checkmark labels met kleur */
.checkmark-label {
  position: relative;
  padding-left: 24px;
  cursor: pointer;
  display: block; /* Zorg ervoor dat het volledige TD klikbaar is */
  width: 100%;
}

.checkmark-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  border-radius: 3px;
  border: 2px solid white;
}

/* Service color indicators */
.politie-color::before { border-color: #0055ff; }
.brandweer-color::before { border-color: #B71C1C; }
.ambulance-color::before { border-color: #FFEB3B; }
.knrm-color::before { border-color: orange; }
.lifeliner-color::before { border-color: #FFC107; }
.oms-color::before { 
  border-color: darkred; 
  background-color: black; 
}

/* Priority color indicators */
.prio1-color::before { border-color: red; }
.prio2-color::before { border-color: orange; }
.prio3-color::before { border-color: green; }
.grip-color::before { 
  border-color: red;
  animation: knipperen 1s infinite;
}

/* Province color indicators */
.friesland-color::before { border-color: #0066cc; }
.groningen-color::before { border-color: #009900; }
.drenthe-color::before { border-color: #cc6600; }
.algemeen-color::before { border-color: #808080; }

@keyframes knipperen {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* Checkbox styling */
.filter-table input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 3px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background-color: transparent;
  position: relative;
  cursor: pointer;
  vertical-align: middle;
}

.filter-table input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.filter-table input[type="checkbox"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Toggle buttons in filter controls */
.filter-controls {
  padding: 15px;
  background-color: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  margin-bottom: 15px;
}

.bulk-filter-actions {
  margin-bottom: 15px;
}

.bulk-action {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.toggle-button {
  padding: 5px 10px;
  background-color: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 3px;
  color: white;
  cursor: pointer;
  transition: background-color 0.2s;
}

.toggle-button:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* Update voor settings-actions */
.settings-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

#apply-filters, #reset-filters {
  padding: 8px 16px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

#apply-filters {
  background-color: #2196F3;
  color: white;
  flex: 2;
}

#apply-filters:hover {
  background-color: #1976D2;
}

#reset-filters {
  background-color: rgba(255, 255, 255, 0.2);
  color: white;
  flex: 1;
}

#reset-filters:hover {
  background-color: rgba(255, 255, 255, 0.3);
}

#apply-filters:active, #reset-filters:active {
  transform: scale(0.98);
}

/* Construction notice styles */
.construction-notice {
    background-color: rgba(255, 204, 0, 0.15);
    border-left: 4px solid #ffcc00;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
}

.notice-icon {
    font-size: 24px;
    margin-right: 15px;
    line-height: 1;
}

.notice-text h3 {
    margin: 0 0 10px 0;
    color: #ffcc00;
}

.notice-text p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #eee;
}

.notice-text ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #ddd;
}

.notice-text li {
    margin-bottom: 4px;
}

.settings-section {
    margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #eee;
}

#text-filter {
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    margin-bottom: 5px;
}

#text-filter:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.5);
}

.tile.filtered {
    display: none !important;
}

small {
    color: #aaa;
    font-size: 12px;
}

/* Push notificatie styling - NIEUW */
.push-notification-settings {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #2196F3;
}

.push-notification-settings h3 {
    font-size: 16px;
    margin-top: 0;
    margin-bottom: 15px;
    color: #eee;
}

.push-status {
    margin-top: 10px;
    font-size: 13px;
    color: #aaa;
}

.status-enabled {
    color: #4CAF50;
}

.status-disabled {
    color: #F44336;
}

/* Toggle switch styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    padding-left: 50px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 20px;
    border-radius: 34px;
    background-color: rgba(255, 255, 255, 0.2);
    transition: .4s;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: .4s;
}

input:checked + .toggle-slider {
    background-color: #2196F3;
}

input:disabled + .toggle-slider {
    background-color: #555;
    cursor: not-allowed;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Responsive aanpassingen */
@media only screen and (max-width: 768px) {
    #settings-overlay {
        width: 100%;
    }
    
    .filter-table th, .filter-table td {
        padding: 6px 4px;
    }
    
    .filter-table th:first-child {
        width: 40%;
    }
    
    .checkmark-label {
        font-size: 0.9em;
    }
    
    .filter-table input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
}