/* Reset box sizing for consistency */
* {
  box-sizing: border-box;
}

/* Apply consistent font and spacing to the form */
form {
  font-family: Arial, sans-serif;
  max-width: 600px;
  margin: 0 auto;
}

/* Uniform field styling */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
input[type="time"],
input[type="file"],
select,
textarea {
  width: 100%;
  height: 35px;
  font-size: 14px;
  font-family: inherit;
  padding: 8px 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
}

input[readonly] {
  color: red;
  background-color: #f9f9f9; /* optional: light background to show it's disabled */
  border: 1px solid #ccc;
  cursor: not-allowed;
}

/* Time inputs in sel-dash-hour.php */
.sel-hour input[type="time"] {
  height: 20px;
  width: 60%;
  font-size: 12px;
  padding: 2px 2px;
  margin: 2px 0;
}



/* Make textarea height consistent */
textarea {
  height: 100px;
  resize: vertical;
}

select {
  width: 100%;
  height: 35px;
  font-size: 14px;
  font-family: inherit;
  padding: 8px 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  appearance: none; /* Removes default styling in some browsers */
  line-height: normal;
}

/* ============================================================
SELECT SEARCH WRAPPER
============================================================ */





/* Wrapper matches form layout */
.dropdown-wrapper {
  width: 100%;
  margin-bottom: 15px;
  max-width: 600px; /* match your form max-width */
  font-family: Arial, sans-serif;
  position: relative;
}

/* Trigger styled like a select box */
.dropdown-selected {
  width: 100%;
  height: 35px;
  font-size: 14px;
  font-family: inherit;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
  line-height: normal;
}

/* Dropdown list styling */
.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%; /* ensures it matches the trigger width */
  background-color: #fff;
  border: 1px solid #ccc;
  border-top: none;
  z-index: 100;
  box-sizing: border-box;
  overflow: hidden;
}

.dropdown-list {
  display: none;
}


/* Search input inside dropdown */
#dropdownSearch {
  width: 100%;
  height: 35px;
  font-size: 14px;
  font-family: inherit;
  padding: 8px 10px;
  border-bottom: 1px solid #eee;
  border-radius: 0;
  border: 1px solid #ccc;
  outline: none;
}

/* Option list styling */
#dropdownOptions {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 200px;
  overflow-y: auto;
}

#dropdownOptions li {
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
}

#dropdownOptions li:hover {
  background-color: #f5f5f5;
}
.dropdown-list {
  transition: all 0.2s ease-in-out;
}

.dropdown-list {
  max-width: 100vw;
  overflow-x: hidden;
}


@media (max-width: 600px) {
  .dropdown-wrapper {
    max-width: 100%;
  }
}










/* Hide default checkbox */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 2px solid #800020;
  border-radius: 3px;
  background-color: #fff;
  cursor: pointer;
  position: relative;
}

/* Checked state */
input[type="checkbox"]:checked {
  background-color: #800020;
}

/* ============================================================
UPLOAD BOX AND PREVIEW GRID
============================================================ */

.upload-box {
  border: 2px dashed #ccc;
  padding: 2em;
  text-align: center;
  cursor: pointer;
  margin-bottom: 1em;
  transition: border-color 0.3s ease;
  border-radius: 8px;
  background-color: #fafafa;
  color: #888; /* Light grey font color */
  height: 50px; /* Adjust this to your desired height */
  display: flex;
  align-items: center;       /* Vertically center content */
  justify-content: center;   /* Horizontally center content */
  font-size: 14px;

}

.upload-box:hover {
  border-color: #800020;
}

.upload-box input[type="file"] {
  display: none;
}

#preview-area img {
  max-width: 150px;
  margin: 10px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.preview-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.preview-item {
  position: relative;
}

.preview-item img {
  max-width: 150px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0,0,0,0.2);
}

.preview-item button {
  position: absolute;
  top: -6px;
  right: -6px;
  background: red;
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 14px;
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.preview-item:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease;
}

.preview-item button:focus {
  outline: 2px solid #fff;
  box-shadow: 0 0 0 2px #800020;
}


@media (max-width: 600px) {
  .preview-item img {
    max-width: 100px;
  }
}


/* ============================================================
checkbox
============================================================ */

.checkbox-icon {
  display: flex;
  align-items: center;       /* Vertically centers both elements */
  gap: 6px;                  /* Adds space between checkbox and icon */
  height: 100%;              /* Ensures it fills the cell height */
}

.checkbox-icon input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14.5px;
  height: 14.5px;
  border: 2px solid #800020;
  border-radius: 3px;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  margin: 0;
  padding: 0;
}

.checkbox-icon input[type="checkbox"]:checked {
  background-color: #800020;
}

.checkbox-icon input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 4px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}





/* Button styling */
button,
input[type="submit"] {
  width: 100%;
  height: 30px;
  font-size: 16px;
  font-weight: bold;
  background-color: #800020;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

button:hover,
input[type="submit"]:hover {
  background-color: grey;
}

.button-group {
  display: flex;
  justify-content: space-between; /* Optional: adds spacing between buttons */
  gap: 10px;                      /* Optional: consistent spacing */

}

.button-group button {
  height: 30px;
  flex: 1;                        /* Each button takes equal space */
  max-width: 49%;              /* Prevents overflow */
  padding: 10px 0;
  background-color: #800020;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  box-sizing: border-box;
  display: flex;
  align-items: center;     /* Vertically center text */
  justify-content: center; /* Horizontally center text */
  text-align: center;
  line-height: 1.2;        /* Optional: fine-tune vertical spacing */


}


table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  border: 1px solid #ccc; /* Light grey outer border */
}


th, td {
  border: 1px solid #ccc;
    padding: 5px;
  text-align: left;
  vertical-align: middle; /* Ensures content is centered vertically */
}

/* Target only the first row of thead (search inputs) */
thead tr:first-child th {
  padding: 4px; /* Remove extra padding around input fields */
  height: 30px; /* Optional: define a tighter row height */
  vertical-align: middle;

}

/* Input styling inside header cells */
thead input[type="text"] {
  width: 100%;
  padding: 4px 6px;
  font-size: 12px;
  height: 24px;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid #ccc;
  border-radius: 3px;
}
tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}
thead tr:first-child th {
  position: sticky;
  top: 0;
  background-color: #fff;
  z-index: 2;
}

thead tr:nth-child(2) th {
  position: sticky;
  top: 30px; /* Adjust based on the height of the first row */
  background-color: #fff;
  z-index: 1;
}

@media screen and (max-width: 600px) {
  table td, table th {
    font-size: 12px;
    padding: 6px;
  }
}

.table-tools {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}

.tool-icon {
  width: 40px;
  height: 20px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.tool-icon:hover {
  transform: scale(1.1);
}



.working-hours-form table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* Ensures columns don't stretch unevenly */
}

.working-hours-form th,
.working-hours-form td {
  padding: 4px;
  text-align: center;
  vertical-align: middle;
  word-wrap: break-word;
}

