/* Customer booking schedule controls — Temizlet custom calendar + time picker. */

.booking-schedule-fields {
  margin-top: 14px !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  align-items: start !important;
}

.booking-schedule-field { min-width: 0 !important; }

.booking-schedule-native-label,
.booking-schedule-native-input {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.booking-schedule-control {
  position: relative;
  min-width: 0;
  min-height: 82px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid #d8ddd9;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfb 100%);
  color: #1d211e;
  box-shadow: 0 7px 22px rgba(18, 40, 26, .05);
  cursor: pointer;
  user-select: none;
  touch-action: manipulation;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

.booking-schedule-control:hover {
  border-color: #9db8a6;
  box-shadow: 0 10px 26px rgba(18, 40, 26, .08);
  transform: translateY(-1px);
}

.booking-schedule-control:focus-visible {
  border-color: #2a9d59;
  outline: 3px solid rgba(42, 157, 89, .13);
  outline-offset: 2px;
}

.booking-schedule-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #dce9df;
  border-radius: 13px;
  background: #f0faf3;
  color: #237f49;
}

.booking-schedule-icon svg,
.booking-schedule-chevron svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.booking-schedule-icon svg { width: 21px; height: 21px; stroke-width: 1.8; }
.booking-schedule-copy { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.booking-schedule-kicker { color: #767d78; font-size: 10px; line-height: 1.25; font-weight: 600; letter-spacing: .015em; }
.booking-schedule-value { display: block; min-width: 0; color: #171b18; font-size: 15px; line-height: 1.3; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-schedule-badge { align-self: center; padding: 6px 8px; border: 1px solid #d8eadf; border-radius: 999px; background: #f3faf5; color: #237544; font-size: 9.5px; line-height: 1; font-weight: 700; white-space: nowrap; }
.booking-schedule-badge[hidden] { display: none !important; }
.booking-schedule-chevron { display: grid; place-items: center; color: #6d756f; }
.booking-schedule-chevron svg { width: 17px; height: 17px; stroke-width: 1.8; }

.booking-schedule-help { display: block; min-height: 16px; margin-top: 7px; color: #747a76; font-size: 10.5px; line-height: 1.4; font-weight: 400; }
.booking-schedule-help.is-warning { color: #a53a32; font-weight: 550; }
.booking-schedule-shortcuts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 1px; }
.booking-schedule-shortcuts > span { margin-right: 2px; color: #7a807c; font-size: 10px; font-weight: 600; }
.booking-schedule-shortcuts button { min-height: 30px; padding: 6px 10px; border: 1px solid #d9dedb; border-radius: 999px; background: #fff; color: #313632; font-size: 10.5px; line-height: 1; font-weight: 600; cursor: pointer; }
.booking-schedule-shortcuts button:hover { border-color: #8fc8a4; background: #f0faf3; color: #1f7442; }

/* Custom picker */
html.booking-picker-open,
html.booking-picker-open body { overflow: hidden !important; }

.booking-picker-root[hidden] { display: none !important; }
.booking-picker-root { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 24px; }
.booking-picker-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 19, .44); backdrop-filter: blur(8px); }
.booking-picker-panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 40px));
  overflow: hidden;
  border: 1px solid rgba(215, 223, 217, .9);
  border-radius: 24px;
  background: #fff;
  color: #202421;
  box-shadow: 0 30px 90px rgba(14, 31, 20, .22), 0 8px 28px rgba(14, 31, 20, .12);
}
.booking-picker-shell { display: flex; min-height: 0; max-height: inherit; flex-direction: column; }
.booking-picker-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 24px 24px 18px; border-bottom: 1px solid #edf0ed; }
.booking-picker-eyebrow { display: block; margin-bottom: 5px; color: #2a9d59; font-size: 10px; font-weight: 800; letter-spacing: .12em; }
.booking-picker-header h3 { margin: 0; color: #171b18; font-size: 22px; line-height: 1.15; font-weight: 700; letter-spacing: -.35px; }
.booking-picker-header p { margin: 7px 0 0; color: #737974; font-size: 12px; line-height: 1.5; }
.booking-picker-close { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid #e0e5e1; border-radius: 11px; background: #f8faf8; color: #525a54; font-size: 24px; line-height: 1; cursor: pointer; }
.booking-picker-close:hover { background: #f0f5f1; color: #1f5f38; }

.booking-calendar-toolbar { display: grid; grid-template-columns: 38px 1fr 38px; align-items: center; gap: 12px; padding: 18px 24px 12px; }
.booking-calendar-toolbar strong { text-align: center; color: #222723; font-size: 15px; font-weight: 700; text-transform: capitalize; }
.booking-calendar-nav { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid #dfe5e0; border-radius: 11px; background: #fff; color: #303632; font-size: 26px; line-height: 1; cursor: pointer; }
.booking-calendar-nav:hover:not(:disabled) { border-color: #9bc9aa; background: #f2faf4; color: #247b46; }
.booking-calendar-nav:disabled { opacity: .32; cursor: default; }
.booking-calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; padding: 6px 24px 7px; }
.booking-calendar-weekdays span { text-align: center; color: #8a908c; font-size: 10px; font-weight: 700; }
.booking-calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 0 24px 20px; }
.booking-calendar-day { position: relative; min-width: 0; aspect-ratio: 1; display: grid; place-items: center; gap: 1px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: #2d322f; font-size: 13px; font-weight: 650; cursor: pointer; transition: border-color .13s ease, background .13s ease, color .13s ease, transform .13s ease; }
.booking-calendar-day:hover:not(:disabled):not(.is-selected) { border-color: #d2e6d8; background: #f3faf5; color: #216f40; transform: translateY(-1px); }
.booking-calendar-day.is-today { border-color: #cae4d3; color: #237544; }
.booking-calendar-day.is-selected { border-color: #2a9d59; background: #2a9d59; color: #fff; box-shadow: 0 7px 18px rgba(42, 157, 89, .2); }
.booking-calendar-day:disabled { color: #c2c7c3; cursor: not-allowed; text-decoration: line-through; }
.booking-calendar-day.is-blank { visibility: hidden; }
.booking-calendar-day small { font-size: 7px; line-height: 1; font-weight: 700; }

.booking-time-selected { margin: 20px 24px 14px; padding: 17px 18px; display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; align-items: end; column-gap: 10px; border: 1px solid #dce9df; border-radius: 16px; background: linear-gradient(135deg, #f4fbf6, #eef8f1); }
.booking-time-selected span { color: #617067; font-size: 10px; font-weight: 700; }
.booking-time-selected strong { grid-row: 1 / span 2; grid-column: 2; color: #173d26; font-size: 32px; line-height: 1; font-weight: 750; letter-spacing: -.8px; }
.booking-time-selected small { color: #2a8e51; font-size: 10px; font-weight: 800; }
.booking-time-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; min-height: 0; padding: 0 24px 18px; }
.booking-time-columns section { min-width: 0; min-height: 0; }
.booking-time-columns h4 { margin: 0 0 8px; color: #717873; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.booking-time-list { height: 285px; overflow-y: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; padding: 2px 5px 8px 2px; scrollbar-width: thin; scrollbar-color: #cfd8d1 transparent; }
.booking-time-option { min-height: 42px; border: 1px solid #e0e5e1; border-radius: 11px; background: #fff; color: #343936; font-size: 12px; font-weight: 650; cursor: pointer; }
.booking-time-option:hover:not(:disabled):not(.is-selected) { border-color: #9ecbad; background: #f3faf5; color: #237544; }
.booking-time-option.is-selected { border-color: #2a9d59; background: #2a9d59; color: #fff; box-shadow: 0 5px 14px rgba(42, 157, 89, .18); }
.booking-time-option:disabled { background: #f7f8f7; color: #c0c5c1; cursor: not-allowed; }

.booking-picker-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 24px 22px; border-top: 1px solid #edf0ed; background: #fbfcfb; }
.booking-picker-summary { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.booking-picker-summary small { color: #878d89; font-size: 9.5px; font-weight: 650; }
.booking-picker-summary strong { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #252a26; font-size: 12px; font-weight: 700; }
.booking-picker-actions { display: flex; gap: 8px; }
.booking-picker-secondary,
.booking-picker-primary { min-height: 40px; padding: 10px 14px; border-radius: 11px; font-size: 11px; font-weight: 700; cursor: pointer; }
.booking-picker-secondary { border: 1px solid #d9dfda; background: #fff; color: #4a514c; }
.booking-picker-secondary:hover { background: #f4f7f5; }
.booking-picker-primary { border: 1px solid #268d50; background: #2a9d59; color: #fff; box-shadow: 0 6px 16px rgba(42, 157, 89, .18); }
.booking-picker-primary:hover { background: #23884c; }

.booking-picker-panel button:focus-visible { outline: 3px solid rgba(42, 157, 89, .18); outline-offset: 2px; }
.booking-schedule-section .section-desc { max-width: 620px; }
.booking-schedule-section .option-grid { margin-bottom: 2px; }

@media (max-width: 768px) {
  .booking-schedule-fields { grid-template-columns: minmax(0, 1fr) !important; gap: 13px !important; }
  .booking-schedule-control { min-height: 78px; grid-template-columns: 42px minmax(0, 1fr) auto 16px; gap: 10px; padding: 12px; border-radius: 15px; }
  .booking-schedule-icon { width: 42px; height: 42px; border-radius: 12px; }
  .booking-schedule-value { font-size: 15px; }
  .booking-picker-root { align-items: end; padding: 0; }
  .booking-picker-panel { width: 100%; max-height: min(86dvh, 760px); border-radius: 24px 24px 0 0; border-bottom: 0; }
  .booking-picker-header { padding: 20px 18px 15px; }
  .booking-picker-header h3 { font-size: 20px; }
  .booking-calendar-toolbar { padding: 15px 18px 10px; }
  .booking-calendar-weekdays { padding-left: 18px; padding-right: 18px; }
  .booking-calendar-grid { gap: 4px; padding: 0 18px 17px; }
  .booking-calendar-day { border-radius: 11px; font-size: 12px; }
  .booking-time-selected { margin: 17px 18px 12px; }
  .booking-time-columns { padding: 0 18px 15px; gap: 10px; }
  .booking-time-list { height: 250px; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .booking-picker-footer { padding: 14px 18px max(18px, env(safe-area-inset-bottom)); }
  .booking-picker-summary { display: none; }
  .booking-picker-actions { width: 100%; }
  .booking-picker-secondary,
  .booking-picker-primary { flex: 1; }
}

@media (max-width: 390px) {
  .booking-schedule-control { grid-template-columns: 40px minmax(0, 1fr) 16px; }
  .booking-schedule-icon { width: 40px; height: 40px; }
  .booking-schedule-badge { display: none !important; }
  .booking-calendar-weekdays span { font-size: 9px; }
  .booking-calendar-grid { gap: 3px; }
  .booking-time-list { grid-template-columns: repeat(2, 1fr); }
}
