/* Reset CSS */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Algemene opmaak */
body {
    font-family: Arial, sans-serif;
    background-color: #f8f9fa;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    position: relative;
}

/* ============================
   Header Stijlen
============================= */
.header {
    background-color: #003366;
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.app-title {
    font-size: 28px;
    margin: 0;
    animation: fadeInDown 0.5s ease-out;
}

.main-nav {
    display: flex;
    flex-grow: 1;
    justify-content: center;
}

.menu {
    list-style-type: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.menu li {
    font-size: 18px;
    position: relative;
}

.menu li a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    transition: background-color 0.3s, transform 0.3s;
}

.menu li a:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
    border-radius: 5px;
}

.title-and-user {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    margin-left: 20px;
    font-size: 0.9rem;
    color: #eee;
}

.button-group {
    display: flex;
    gap: 10px;
}

.change-v-button, .logout-button {
    padding: 8px 12px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
}

.change-v-button {
    background-color: #007bff;
}

.logout-button {
    background-color: #d9534f;
}

.vestiging-badge {
    background-color: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    margin-left: 8px;
}



/* ============================
   Animaties
============================= */
@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   Footer
============================= */
.footer {
    text-align: center;
    padding: 10px;
    background-color: #003366;
    color: white;
    position: relative;
    bottom: 0;
    width: 100%;
    margin-top: auto;
}

/* ============================
   Containers
============================= */
.login-container, .dashboard-container {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    width: 100%;
    max-width: 1400px; /* Maximale breedte voor de dashboard-container */
}

/* ============================
   Formulieren
============================= */
.form-container {
    display: flex;
    justify-content: center;
}

.form-control {
    width: 100%; /* Zorg ervoor dat het de volledige breedte van de container gebruikt */
    padding: 10px; /* Voldoende ruimte binnenin het veld */
    border: 1px solid #ccc; /* Duidelijke rand */
    border-radius: 5px; /* Afgeronde hoeken */
    margin-bottom: 15px; /* Ruimte onder de invoervelden */
    appearance: none; 
}

.form-card {
    width: 100%;
    max-width: 1000px; /* Pas dit aan naar de gewenste breedte van het formulier */
    padding: 20px;
    background-color: white;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
}


.form-group {
    display: flex;
    justify-content: space-between; /* Zorgt ervoor dat label en input goed uitgelijnd zijn */
    align-items: center; /* Centreringslijn voor label en input */
    margin-bottom: 15px;
}

label {
    font-weight: bold;
    margin-bottom: 5px; /* Ruimte onder de label */
    flex: 0 0 150px; /* Breedte van het label, dit voorkomt dat het label te smal is */
}

#employee {
    width: 100%;
}

input[type="text"],
input[type="password"],
select,
input[type="date"],
input[type="time"] {
    width: calc(100% - 20px); /* 100% breedte minus padding */
    padding: 10px;
    margin: 5px 0 15px; /* Ruimte boven en onder de invoervelden */
    border: 1px solid #ccc;
    border-radius: 5px;
}


/* ============================
   Knoppen
============================= */
button, .btn-primary {
    width: 100%;
    padding: 10px;
    background-color: #007BFF;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover, .btn-primary:hover {
    background-color: #0056b3;
}

/* ============================
   Meldingen
============================= */
.flashes {
    list-style-type: none;
    padding: 10px;
    margin: 20px 0;
}

.success {
    color: green;
}

.error {
    color: red;
}

/* ============================
   Tegels en Dashboard
============================= */
.tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    justify-items: center;
    margin-top: 20px;
}

.tile {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 260px;
    transition: transform 0.3s ease-in-out;
    text-decoration: none;
    color: #333;
}

.tile:hover {
    transform: translateY(-5px);
}

.tile h3 {
    font-size: 1.5rem;
    color: #007BFF;
}

.tile p {
    color: #555;
}

.tile-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}




/* ============================
   Add employee modal formulier
============================= */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: #fff;
  padding: 30px 25px;
  width: 90%;
  max-width: 480px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
}

.modal-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 20px;
}

.modal-form .form-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.modal-form label {
  margin-bottom: 6px;
  font-weight: 500;
}

.modal-form input,
.modal-form select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  appearance: none;
}

input[type="email"] {
  display: block;
  width: 96% !important;
  padding: 10px !important;
  font-size: 14px !important;
  border: 1px solid #ccc !important;
  border-radius: 6px !important;
  box-sizing: border-box !important;
  font-family: inherit;
  background-color: white !important;
  margin: 0 !important;
  margin-bottom: 10px !important;
}


.btn-primary {
  background-color: #007bff;
  color: white;
  padding: 12px;
  font-size: 16px;
  border: none;
  border-radius: 6px;
  width: 100%;
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0069d9;
}

.close {
  position: absolute;
  right: 15px;
  top: 10px;
  font-size: 24px;
  cursor: pointer;
}

.centered-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}


/* ============================
   Tables
============================= */

/* Zorg ervoor dat de tabel breedte meebeweegt */
#usersTable, #employees-table {
    width: 100%;
    table-layout: auto;
    word-wrap: break-word; /* Zorg dat tekst wordt afgebroken */
}

#usersTable th, #employees-table th {
    white-space: nowrap; /* Voorkom dat de kolomnamen worden afgebroken */
}

#usersTable td, #employees-table td {
    word-wrap: break-word;
    white-space: normal; /* Zorg dat de inhoud wordt afgebroken */
}

/* Extra ruimte tussen de zoekbalk en de tabel */
.dataTables_wrapper .top {
    margin-bottom: 10px;
}

/* Responsieve tabel */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


#employees-table {
    width: 100%;
    table-layout: auto; /* Zorgt ervoor dat kolommen zich kunnen aanpassen */
    border-collapse: collapse;
    margin-top: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#employees-table th, #employees-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

#employees-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

#employees-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

#employees-table tbody tr:hover {
    background-color: #f2f2f2;
}

/* Actieknoppen in tabel */
.table-actions {
    display: flex;
    gap: 5px;
}

.table-actions a {
    padding: 5px 10px;
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

/* Toevoegknop */
#add-employee-btn {
    margin-bottom: 10px;
    padding: 15px;
    background-color: dodgerblue;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.2em;
    transition: transform 0.2s, background-color 0.2s;
}

#add-employee-btn:hover {
    transform: scale(1.05);
    background-color: #007bff;
}


/* Algemene styling voor de container */
.table-container {
    margin: 20px auto;
    width: 95%;
    border: 1px solid #ddd;
    border-radius: 5px;
    overflow: hidden;
    background-color: #f9f9f9;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Header styling */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: #007bff;
    color: white;
}

.add-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add-btn:hover {
    background-color: #0056b3;
}

/* Zoekvak styling */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-box input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Tabel styling */
#usersTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

#usersTable th, #usersTable td {
    border: 1px solid #ddd;
    padding: 10px;
}

#usersTable th {
    background-color: #f4f4f4;
    font-weight: bold;
    text-align: center;
}

#usersTable td {
    text-align: center;
}

.action-buttons a {
    margin: 0 5px;
    cursor: pointer;
}

.action-buttons a .fa-edit:hover {
    color: darkblue;
}

.action-buttons a .fa-trash-alt:hover {
    color: darkred;
}

/* Styling voor de knop */
.add-btn {
    background-color: #007bff; /* Blauwe achtergrondkleur */
    color: white; /* Witte tekstkleur */
    border: none;
    border-radius: 5px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-bottom: 10px; /* Voegt ruimte onder de knop toe */
}

.add-btn:hover {
    background-color: #0056b3; /* Donkerdere blauw bij hover */
}

/* Centraal positioneren als nodig */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header .add-btn {
    margin-left: auto;
}

/* ============================
   SELECT2 css
============================= */
.select2-container .select2-selection--multiple {
    border-radius: 5px;
    border: 1px solid #ccc;
    padding: 5px;
    min-height: 38px;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #007bff;
    border: none;
    border-radius: 3px;
    color: white;
    padding: 2px 8px;
    margin-top: 5px;
}



/* ============================
   Media Queries
============================= */
@media (max-width: 768px) {
    .dashboard-container {
        width: 90%;
    }

    #employees-table th, #employees-table td {
        padding: 10px;
        font-size: 14px;
    }

    #add-employee-btn {
        padding: 12px;
        font-size: 1em;
    }

    .tile {
        flex: 0 1 calc(50% - 20px);
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        width: 95%;
    }

    #employees-table {
        font-size: 12px;
    }

    .header h1 {
        font-size: 20px;
    }

    .tile {
        flex: 0 1 calc(100% - 20px);
    }
}
