/* === Base Layout === */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Ubuntu', sans-serif;
}

/* Use full-height flex layout starting from <body> */
body {
    display: flex;
}

.header-logo {
    height: 40px; /* adjust as needed */
    width: auto;
    padding-left: 10px;
    padding-bottom: 30px;
}

/* === Side Drawer (Fixed & Always Visible) === */
.side-drawer {
    width: 250px;
    height: 100vh;
    background-color: #245A7C;
    color: white;
    padding-top: 25px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
}
.side-drawer a {
    display: block;
    padding: 12px 24px;
    text-decoration: none;
    color: white;
    font-size: 16px;
}

.side-drawer a:hover {
    background-color: #557388;
    color: white;
}
.side-drawer a.active {
    background-color: #1b445e; /* darker shade or any highlight color */
    color: #ffffff;
}

.drawer-logout {
    position: absolute;
    bottom: 40px;
    left: 0;
    right: 0;
    padding: 12px 24px;
    text-decoration: none;
    color: white;
    font-size: 16px;
    display: flex;
    align-items: center;
}

.drawer-logout:hover {
    background-color: #557388;
    color: white;
}

/* === Main Area Next to Drawer === */
.main {
    margin-left: 250px; /* space for the drawer */
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Content === */
.content {
    flex: 1;
    padding: 20px 0 20px 20px;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
}

/* === Table Header === */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 25px; /* add padding to right side */

}

.add-button {
    background: #245A7C;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
}

.add-button:hover {
    background: #557388;
}


h3 {
    font-size: 24px;
    color: #245A7C;
    font-weight: 600;
}

/* === Table === */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.05);
}

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

.data-table th {
    background-color: #f4f4f4;
    font-weight: 500;
}

.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 10%;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 40%;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 35%;
}

.action-icon {
    /*display: flex;*/
    /*justify-content: center;  !* center horizontally *!*/
    align-items: center; /* center vertically */
    height: 100%;
}


/* === Footer === */
.footer {
    height: 100px;
    background-color: #245A7C;
    color: white;
    display: flex;
    align-items: center;
    /*position: relative;*/
    padding-left: 25px;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-logo {
    height: 50px;
    margin-bottom: 10px;
}

.footer-copy {
    margin: 0;
    font-size: 14px;
    font-family: 'Ubuntu', sans-serif;
}

/* Center the form wrapper */
.form-center-wrapper {
    display: flex;
    justify-content: center; /* Horizontal centering */
    align-items: center; /* Vertical centering */
    min-height: 70vh; /* Minimum height to push footer down */
    padding: 20px;
}

/* Form styling */
.checkin-form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Space between form elements */
    width: 100%;
    max-width: 400px; /* Optional: Set maximum form width */
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Form input styling */
.form-input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box; /* Include padding in width */
}

input:focus,
select:focus {
    border-color: #437593; /* Bootstrap blue */
    outline: none; /* Remove default focus outline */
    box-shadow: 0 0 0 1px rgb(69, 109, 135, 0.2); /* Optional soft glow */
}

/* Button styling */
.checkin-button {
    padding: 12px 20px;
    background-color: #245A7C;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.checkin-button:hover {
    background-color: #1b445e;
}

/* Select dropdown arrow styling */
select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1em;
}

/* === Infobar Styles === */
#infobar {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 25%;
    z-index: 1000;
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    padding: 12px 16px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    gap: 10px; /* Add spacing between text and button */
    min-height: 60px; /* Ensure there's enough height */
}

#infobar span {
    flex-grow: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: inline-block;
}

#infobar.error {
    background-color: #f44336;
}

#infobar.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

#infobar-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    line-height: 1;
}

/* Minimal modal styling */
.modal {
    display: none;
    position: fixed;
    top: 30%;
    left: 50%;
    transform: translate(-50%, -30%);
    background: white;
    border: 1px solid #ccc;
    padding: 30px; /* increased padding */
    z-index: 1000;
    width: 500px; /* increase modal width */
    max-width: 90vw; /* responsive safety */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}


.modal input {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 16px;
}

.modal select {
    padding: 12px 40px 12px 15px; /* extra right padding for arrow */
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    margin-top: 16px;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='20' viewBox='0 0 24 24' width='20' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
}

.modal input:focus,
.modal select:focus {
    border-color: #437593; /* Bootstrap blue */
    outline: none; /* Remove default focus outline */
    box-shadow: 0 0 0 1px rgb(69, 109, 135, 0.2); /* Optional soft glow */
}


.modal-buttons {
    width: 100%;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.modal-buttons button {
    background-color: #245A7C;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.modal-buttons button:hover {
    background-color: #245A7C;
}

.login-logo {
    display: block;
    margin: 5vh auto 2vh auto; /* top, horizontal auto, bottom spacing */
    max-width: 20vw;           /* responsive width */
    width: 100%;
    height: auto;
}

.login-form {
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem; /* adjusts spacing based on screen size */
    width: 90%;
    max-width: 400px; /* keeps form compact on large screens */
}

.login-wrapper {
    min-height: 30vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.dropdown {
      position: relative;
      display: inline-block;
      width: 100%;
    }

    .dropdown-btn {
      width: 100%;
      padding: 10px;
      border: 1px solid #ccc;
      background: #fff;
      cursor: pointer;
      text-align: left;
    }

    .dropdown-content {
      display: none;
      position: absolute;
      background-color: #fff;
      border: 1px solid #ccc;
      width: 100%;
      max-height: 200px;
      overflow-y: auto;
      z-index: 1;
    }

    .dropdown-content label {
      display: block;
      padding: 8px;
      cursor: pointer;
    }

    .dropdown-content label:hover {
      background-color: #f1f1f1;
    }

    .show {
      display: block;
    }
