/* 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="tel"],
input[type="url"],
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;
}

fieldset {

      border-radius: 8px;
      background-color: #f9f9f9;
}

.day-checkboxes,
.holiday-options {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  align-items: center;
}

.day-checkboxes label,
.holiday-options label {
  font-size: 10px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.day-checkboxes input[type="checkbox"],
.holiday-options input[type="radio"] {
  transform: scale(0.85);
  margin-right: 2px;
  vertical-align: middle;
  position: relative;
  top: -2px; /* nudges the input up slightly */
}



.regform-label {
  font-size: 9px;
  font-style: italic;
  color: #666;
  font-family: Arial, sans-serif;
  /*margin-bottom: 4px;*/
  display: block;
}

/* Small italic field label utility (very small, for compact forms)
   Use in forms as: <label class="field-label" for="field_id">Label text</label> */
.field-label {
  display: block;
  font-size: 9px; /* very small */
  font-style: italic;
  color: #666;
  margin-bottom: 4px;
  line-height: 1;
  font-family: Arial, sans-serif;
}

/* Compact form variant: labels sit very close above their fields */
.form-compact .field-label {
  margin-bottom: 2px; /* very small gap between label and field */
}
.form-compact input[type="text"],
.form-compact input[type="email"],
.form-compact select,
.form-compact textarea,
.form-compact input[type="file"] {
  margin-top: 0; /* no extra top gap */
  margin-bottom: 10px; /* small bottom gap after field */
}

/* Range slider styling to match form inputs */
.range-slider {
  width: 100%;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.range-slider input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 15px; /* visually similar to other inputs */
  margin: 4px 0 2px 0;
  /* default background will be updated dynamically by JS to show filled portion */
  background: linear-gradient(to right, #800020 0%, #efefef 0%);
  border-radius: 6px;
}
.range-slider input[type="range"]:focus { outline: none; }
.range-slider input[type="range"]::-webkit-slider-runnable-track {
  height: 8px;
  background: transparent; /* use input background gradient for fill */
  border-radius: 6px;
}
.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #800020;
  border-radius: 50%;
  margin-top: -5px;
}
.range-slider input[type="range"]::-moz-range-track {
  height: 8px;
  background: transparent;
  border-radius: 6px;
}
.range-slider input[type="range"]::-moz-range-progress {
  background: #800020;
  height: 8px;
}
.range-slider input[type="range"]::-ms-track {
  height: 8px;
  background: transparent;
  border-radius: 6px;
  color: transparent;
}
.range-slider input[type="range"]::-ms-fill-lower {
  background: #800020;
}
.range-slider input[type="range"]::-ms-fill-upper {
  background: #efefef;
}
.range-slider .range-current {
  /* removed: no longer used. kept empty for backward compatibility */
  display: none;
}
.range-slider .range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #666;
  padding: 0 2px;
}


/* ============================================================
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%;
  }
}


.index-search-field {
  height: 15px;
  font-size: 0.75em;
  /*padding: 2px 8px;*/
  border: 1px solid #ccc;
  border-radius: 6px;
  width: 100%;
  max-width: 400px;
  box-sizing: border-box;
  background-color: #f9f9f9;
  outline: none;
}

.index-search-field::placeholder {
  font-size: 0.75em;
  color: #999;
}


/* Hide default radio */
input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 2px solid #800020;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  vertical-align: middle;
  transform: scale(0.85);
  margin-right: 2px;
}

/* Checked state */
input[type="radio"]:checked {
  background-color: #800020;
}


/* 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: 70px; /* Adjust this to your desired height */
  display: flex;
  align-items: center;       /* Vertically center content */
  justify-content: center;   /* Horizontally center content */
  font-size: 12px;

}

.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-grid img {
  max-width: 150px;
  margin: 10px;
  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 - keeps original behavior */
  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 */


}

/* Button group for standalone buttons outside forms - supports 3+ buttons */
.button-group-standalone {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.button-group-standalone button {
  height: 30px;
  flex: 1;                        /* Equal space distribution */
  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;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
}

.button-group-standalone button:hover {
  background-color: grey;
}


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-start;
  gap: 10px;
  margin-bottom: 0;
  position: relative; /* NOT absolute */
  padding-left: 1rem; /* aligns with table content */
  font-size: 1.2rem;
}
.delete-group {
  display: inline-flex;
  align-items: center;
  gap: 0; /* tight spacing between icon and message */
}
#deleteMessage {
  font-weight: 100;
  font-size: 0.75rem;
  color: maroon;
  margin: 0;
  padding: 0;
  line-height: 1;
}



.tool-icon {
  width: 30px;
  height: 30px;
  cursor: pointer;
  transition: transform 0.2s ease;
  color: maroon; /* default color */
}

/* When you want other color icons */
.tool-icon.maroon {
  color: darkgray;
}
.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;
}

.time-autofill {
  width: 100px;
  text-align: center;
}

/* ---------------------------------------STARS  */
/* REVIEWS ratings WITH STARS  */
/* ---------------------------------------STARS  */
.star-display {
  font-size: 18px;
}

.star {
  color: #ccc; /* default gray */
}

.star.full {
  color: #800020; /* maroon */
}

.star.half {
  position: relative;
  display: inline-block;
  color: #ccc; /* base gray */
}

.star.half::before {
  content: '\2605';
  position: absolute;
  left: 0;
  width: 50%;
  overflow: hidden;
  color: #800020; /* maroon fill */
}

.avg-label {
  margin-left: 5px;
  font-size: 0.9em;
  color: #333;
}



.star-rating {
  direction: rtl;
  display: inline-flex;
  gap: 5px;
}
.star-rating-wrapper {
  display: flex;
  justify-content: center;
  margin-bottom: 5px; /* reduced from 15px */
  flex-direction: column;
  align-items: center;
}
.star-rating-message {
  font-size: 10px;
  color: #800020;
  margin-top: 2px; /* tight spacing */
}


.star-rating input[type="radio"] {
  display: none;
}
.star-rating label {
  font-size: 24px;
  color: #ccc;
  cursor: pointer;
}
.star-rating input[type="radio"]:checked ~ label {
  color: #800020;
}
.star-rating label:hover,
.star-rating label:hover ~ label {
  color: orange;
}

.rating-summary.inline-stars {
  font-size: 1.1em;
}



.rating-summary {
  margin: 10px 0 20px;
  font-size: 0.9em;
  color: #800020;
}
.rating-row {
  display: flex;
  align-items: center;
  margin-bottom: 4px;
  font-size: 0.5em;
}
.rating-row .stars {
  color: #800020;
  min-width: 80px;
  font-size: 0.5em;
}
.rating-row .count {
  margin-left: 10px;
  font-size: 0.5em;
}

.rating-count {
  margin-left: 5px;
  font-size: 0.75em; /* smaller than surrounding stars */
  color: #333;
}


.review-box-full {
  width: 100%;
  margin: 20px 0;
  padding: 10px 15px;
  border-left: 4px solid #800020; /* vertical bar */
  background-color: #f9f9f9;
  box-sizing: border-box;
}
.stars-maroon {
  color: #800020;
}


.review-box {
  margin-top: 20px;
  padding: 10px;
  background-color: #f9f9f9;
  border-left: 4px solid #800020;
}
.review-box p {
  margin: 5px 0;
}
.review-heading {
  color: #800020;
}

/* Child table styles for expandable giftiser codes */
.giftiser-codes-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 10px;
  background-color: #d3d3d3;
}

.giftiser-codes-table thead tr {
  background-color: #d3d3d3 !important;
}

.giftiser-codes-table th {
  padding: 8px;
  border: 1px solid #999;
  color: #333;
  background-color: #d3d3d3 !important;
}

.giftiser-codes-table tbody tr {
  background-color: #d3d3d3;
}

.giftiser-codes-table td {
  padding: 6px;
  border: 1px solid #999;
  color: #333;
}

.giftiser-codes-table td.center {
  text-align: center;
}

.giftiser-codes-table td.code {
  font-family: monospace;
}

.giftiser-codes-table td.status {
  font-weight: bold;
}

.giftiser-codes-table td.status.available {
  color: green;
}

.giftiser-codes-table td.status.sold {
  color: blue;
}

.giftiser-codes-table td.status.reserved {
  color: orange;
}

.giftiser-codes-table td.status.used {
  color: gray;
  font-size: 1em;
  margin-top: 30px;
}
