/* Hide the original select visually but keep it available for form submission + plugin JS */
.eg-fooevents-hidden {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}

/* New input inherits Woo styling; these are small tasteful defaults */
.eg-fooevents-datepicker {
  width: 100%;
  border-radius: 6px;
}

/* Make the wrapper feel clickable */
.fooevents-bookings-date-slot-date .woocommerce-input-wrapper {
  cursor: pointer;
}

/* Disabled dates visual */
.ui-datepicker td.eg-disabled a {
  opacity: 0.35;
  pointer-events: none;
}

/* Optional: clear error state when required */
.eg-fooevents-datepicker.eg-invalid {
  border-color: #cc1818;
  box-shadow: 0 0 0 1px rgba(204, 24, 24, 0.2);
  outline: none;
  background: rgba(204, 24, 24, 0.03);
}

/* If datepicker is hidden behind other elements, bump its stacking */
.ui-datepicker {
  z-index: 999999 !important;
}

/* =========================
   Datepicker base
========================= */

.ui-datepicker {
  background: #ffffff;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  border: 1px solid #e7e7e7;
  width: 300px;
  font-family: inherit;
}

.ui-datepicker-header {
  background: #f6f6f6;
  border-radius: 10px;
  border: none;
  padding: 10px 12px;
  font-weight: 700;
}

.ui-datepicker-title {
  font-size: 16px;
  letter-spacing: 0.2px;
}

.ui-datepicker-prev,
.ui-datepicker-next {
  top: 10px;
  cursor: pointer;
}

.ui-datepicker th {
  color: #666;
  font-weight: 600;
  padding: 8px 0 6px;
  font-size: 13px;
}

/* Day cells */
.ui-datepicker td {
  padding: 3px;
}

.ui-datepicker td a,
.ui-datepicker td span {
  display: block;
  text-align: center;
  border-radius: 10px;
  padding: 10px 0;
  border: 1px solid transparent !important;
  font-size: 14px;
  line-height: 1;
}

/* Available day */
.ui-datepicker td a {
  background: #f4f4f5;
  color: #1b1b1b;
  transition: all 0.15s ease;
}

/* Hover */
.ui-datepicker td a:hover {
  background: #111;
  color: #fff;
}

/* Selected */
.ui-datepicker td.ui-datepicker-current-day a,
.ui-datepicker td.ui-datepicker-current-day a:hover {
  background: #7c1d1d;
  color: #fff;
  font-weight: 700;
}

/* Today (optional highlight) */
.ui-datepicker td.ui-datepicker-today a {
  border-color: rgba(124, 29, 29, 0.35) !important;
}

/* =========================
   Disabled / unavailable dates (READABLE)
========================= */

/* jQuery UI renders disabled dates as <span> */
.ui-datepicker td.eg-disabled span {
  background: #f1f1f1 !important;
  color: #b3b3b3 !important;
  border: 1px solid #ededed !important;
  cursor: not-allowed !important;
  position: relative;
}

/* Subtle diagonal strike */
.ui-datepicker td.eg-disabled span::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 2px;
  background: rgba(170,170,170,0.55);
  transform: rotate(-25deg);
  border-radius: 2px;
}

/* Also cover cases where disabled still renders as <a> (rare) */
.ui-datepicker td.eg-disabled a {
  background: #f1f1f1 !important;
  color: #b3b3b3 !important;
  pointer-events: none;
  cursor: not-allowed !important;
  position: relative;
}
.ui-datepicker td.eg-disabled a::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  top: 50%;
  height: 2px;
  background: rgba(170,170,170,0.55);
  transform: rotate(-25deg);
  border-radius: 2px;
}

/* =========================
   Input styling
========================= */

.eg-fooevents-datepicker {
  font-size: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #cfcfcf;
  background: #fff;
}

.eg-fooevents-datepicker:focus {
  border-color: #7c1d1d;
  box-shadow: 0 0 0 3px rgba(124,29,29,0.14);
  outline: none;
}

/* Error state */
.eg-fooevents-datepicker.eg-invalid {
  border-color: #cc1818;
  background: #fff5f5;
}

/* Keep above other UI */
.ui-datepicker {
  z-index: 999999 !important;
}


/* =========================================
   HARD RESET dark jQuery UI backgrounds
========================================= */

/* Kill any dark table backgrounds */
.ui-datepicker,
.ui-datepicker table,
.ui-datepicker tbody,
.ui-datepicker tr {
  background: #fff !important;
}

/* Empty cells (before/after month) */
.ui-datepicker td.ui-datepicker-other-month {
  background: #fff !important;
}

/* =========================================
   Disabled / unavailable days (CLEAR & LIGHT)
========================================= */

/* Disabled days render as <span> */
.ui-datepicker td.eg-disabled span {
  background: #ccc !important;
  color: #666 !important;
  border: 1px solid #bbb !important;
  cursor: not-allowed !important;
  position: relative;
}

/* Fallback if disabled renders as <a> */
.ui-datepicker td.eg-disabled a {
  background: #ccc !important;
  color: #666 !important;
  pointer-events: none !important;
  cursor: not-allowed !important;
  position: relative;
}

/* Subtle diagonal strike */
.ui-datepicker td.eg-disabled span::after,
.ui-datepicker td.eg-disabled a::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  top: 50%;
  height: 2px;
  background: rgba(90,90,90,0.6);
  transform: rotate(-25deg);
  border-radius: 2px;
}

/* =========================================
   Available days contrast
========================================= */

.ui-datepicker td a {
  background: #f5f5f5 !important;
  color: #111 !important;
}

/* Hover */
.ui-datepicker td a:hover {
  background: #111 !important;
  color: #fff !important;
}

/* Selected */
.ui-datepicker td.ui-datepicker-current-day a {
  background: #7c1d1d !important;
  color: #fff !important;
  font-weight: 700;
}

