.hours-calendar {
  --calendar-open-bg: #dcebd9;
  --calendar-open-text: #254e2e;
  --calendar-closed-bg: #f4dedb;
  --calendar-closed-text: #8b332a;
  --calendar-special-bg: #f6e8be;
  --calendar-special-text: #6d531b;
  max-width: 430px;
  margin: 16px 0;
}

/* Calendar cells and the selected date detail use the exact same palette. */
.hours-calendar .day-open {
  background: var(--calendar-open-bg);
  color: var(--calendar-open-text);
}
.hours-calendar .day-closed {
  background: var(--calendar-closed-bg);
  color: var(--calendar-closed-text);
}
.hours-calendar .day-special {
  background: var(--calendar-special-bg);
  color: var(--calendar-special-text);
}
.calendar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.calendar-heading button,
.calendar-grid button {
  background: #f8f7ee;
  color: var(--green);
  border: 1px solid #d3dacb;
  border-radius: 5px;
  padding: 8px;
  font: inherit;
  cursor: pointer;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}
.calendar-grid .weekday {
  text-align: center;
  font-size: 11px;
  padding: 5px 0;
}
.calendar-grid button {
  min-width: 0;
  font-size: 12px;
}
.calendar-grid .day-closed {
  background: #f4dedb;
  color: #8b332a;
}
.calendar-grid .day-open,
.admin .calendar-grid .day-open {
  background: #dcebd9;
  color: #254e2e;
  border-color: #a9c5a4;
}
.calendar-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 105px;
  gap: 12px;
  align-items: start;
}
.calendar-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 30px;
  font-size: 11px;
  line-height: 1.5;
}
.calendar-legend > span {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  border: 1px solid #69836c;
  border-radius: 3px;
  margin-top: 2px;
}
.legend-swatch.day-open {
  background: #dcebd9;
}
.legend-swatch.day-closed {
  background: #f4dedb;
  border-color: #b87068;
}
.legend-swatch.day-special {
  background: #f6e8be;
  border-color: #ad903c;
}
.hours-calendar .selected-hours {
  margin-top: 14px;
}
.selected-hours.day-open {
  background: #dcebd9;
  color: #254e2e;
}
.selected-hours.day-closed {
  background: #f4dedb;
  color: #8b332a;
}
.selected-hours.day-special {
  background: #f6e8be;
  color: #6d531b;
}
.hours-calendar .selected-hours p {
  margin: 5px 0;
}
.bulk-schedule {
  margin-top: 24px;
  padding: 20px;
  background: #eef0e5;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.bulk-date-range {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.bulk-status {
  font-size: 13px;
}
@media (max-width: 600px) {
  .calendar-body {
    grid-template-columns: 1fr;
  }
  .calendar-legend {
    flex-direction: row;
    flex-wrap: wrap;
    padding-top: 0;
    gap: 10px;
  }
  .bulk-date-range {
    grid-template-columns: 1fr;
    gap: 0;
  }
}
.calendar-grid .day-special {
  background: #f6e8be;
  color: #6d531b;
}
.calendar-grid [aria-current='date'] {
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.calendar-grid [aria-pressed='true'] {
  outline: 2px solid var(--green);
  outline-offset: 0;
}
.hours-badge {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 20px;
  background: #ecdfd5;
  font-size: 12px;
}
.hours-badge.is-open {
  background: #dbe8d4;
}
.customer-hours h3 {
  font-size: 24px;
  margin-bottom: 12px;
}
.customer-hours p {
  font-size: 12px;
  margin: 8px 0;
}
.customer-hours details {
  font-size: 12px;
  margin-top: 14px;
}
.customer-hours summary {
  cursor: pointer;
}
.selected-hours {
  background: #e8ecdf;
  padding: 12px;
  border-radius: 6px;
  font-size: 12px;
}
.weekly-hours {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
  font-size: 12px;
}
.weekly-hours th,
.weekly-hours td {
  text-align: left;
  padding: 7px;
  border-bottom: 1px solid #d3dacb;
}
.weekly-row {
  display: grid;
  grid-template-columns: 80px 120px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.slot-editor {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.slot-row {
  display: flex;
  gap: 12px;
}
.admin .slot-row label {
  font-size: 11px;
  margin: 0;
}
.admin .slot-row input {
  min-width: 110px;
}
.schedule-edit-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.date-editor {
  scroll-margin-top: 24px;
  padding: 16px;
  border: 1px solid #a9c5a4;
  border-radius: 8px;
  background: #f7f9f0;
}
.date-editor > h3 {
  margin-top: 0;
}
.date-editor:focus-within {
  outline: 2px solid #7c9873;
  outline-offset: 3px;
}
.date-list-feedback {
  font-size: 13px;
  line-height: 1.7;
}
.admin .calendar-grid button,
.admin .calendar-heading button {
  margin: 0;
  padding: 9px 4px;
}
.admin .calendar-grid .day-closed {
  background: #f4dedb;
  color: #8b332a;
}
.admin .calendar-grid .day-special {
  background: #f6e8be;
  color: #6d531b;
}
.exception-list {
  max-height: 400px;
  overflow-y: auto;
}
.exception-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
  font-size: 12px;
}
.exception-row span {
  flex: 1;
  min-width: 180px;
}
.admin .exception-row button {
  padding: 7px;
  font-size: 12px;
}
@media (max-width: 900px) {
  .weekly-row {
    grid-template-columns: 80px minmax(0, 1fr);
  }
  .weekly-row .slot-editor {
    grid-column: 1 / -1;
  }
  .schedule-edit-grid {
    grid-template-columns: 1fr;
  }
}
