/* TFS Datepicker v1 - user-facing spa calendar */
:root {
  --tfs-dp-teal: #34778A;
  --tfs-dp-teal-soft: rgba(52,119,138,.18);
  --tfs-dp-season-a: #19b8ad;
  --tfs-dp-season-b: #f58220;
  --tfs-dp-red: #ee220c;
  --tfs-dp-border: rgba(0,0,0,.13);
  --tfs-dp-closed: rgba(108,117,125,.35);
}

.tfs-date-picker {
  --dp-bg: var(--bs-body-bg, #fff);
  --dp-text: var(--bs-body-color, #202124);
  --dp-muted: var(--bs-secondary-color, #6c757d);
  --dp-border: var(--tfs-dp-border);
  background: var(--dp-bg);
  color: var(--dp-text);
  border: 1px solid var(--dp-border);
  border-radius: 1rem;
  padding: 1rem;
}

[data-bs-theme="dark"] .tfs-date-picker,
.dark-mode .tfs-date-picker,
body.dark .tfs-date-picker,
body.theme-dark .tfs-date-picker {
  --dp-bg: #111518;
  --dp-text: #f4f4f4;
  --dp-muted: rgba(255,255,255,.66);
  --dp-border: rgba(255,255,255,.14);
  --tfs-dp-teal-soft: rgba(25,184,173,.25);
  --tfs-dp-closed: rgba(255,255,255,.25);
}

.tfs-date-picker.tfs-dp-compact {
  padding: .75rem;
  border-radius: .85rem;
}

.tfs-dp-summary {
  text-align: center;
  font-weight: 700;
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.tfs-dp-controls {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.tfs-dp-field label {
  display: block;
  text-transform: uppercase;
  font-size: .78rem;
  letter-spacing: .06em;
  color: var(--dp-muted);
  margin-bottom: .35rem;
  font-weight: 700;
}

.tfs-dp-field select,
.tfs-dp-field input {
  width: 100%;
  min-height: 48px;
  border-radius: .45rem;
}

.tfs-dp-drop-toggle {
  cursor: pointer;
}

.tfs-date-picker[data-variant="drop"] .tfs-dp-panel {
  display: none;
  margin-top: 1rem;
}

.tfs-date-picker[data-variant="drop"].tfs-dp-open .tfs-dp-panel {
  display: block;
}

.tfs-dp-month-shell {
  border: 1px solid var(--dp-border);
  border-radius: .75rem;
  overflow: hidden;
}

.tfs-dp-month-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.tfs-dp-month {
  padding: .85rem;
  min-width: 0;
}

.tfs-dp-month + .tfs-dp-month {
  border-left: 1px solid var(--dp-border);
}

.tfs-dp-month-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
}

.tfs-dp-month-title {
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
}

.tfs-dp-nav {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--dp-text);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tfs-dp-nav:hover:not(:disabled) {
  background: var(--tfs-dp-teal-soft);
}

.tfs-dp-nav[hidden] {
  display: inline-flex !important;
  visibility: hidden;
  pointer-events: none;
}

.tfs-dp-nav span {
  display: inline-block;
  font-size: 2rem;
  line-height: 1;
  transform: translateY(-1px);
}

.tfs-dp-nav:disabled {
  opacity: 0;
  pointer-events: none;
}

.tfs-dp-weekdays,
.tfs-dp-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
}

.tfs-dp-weekdays span {
  font-size: .75rem;
  color: var(--dp-muted);
  font-weight: 700;
  padding: .35rem 0;
}

.tfs-dp-day {
  position: relative;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: var(--dp-text);
  border-radius: .45rem;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 1px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.tfs-dp-day:not(:disabled):hover {
  background: var(--tfs-dp-teal-soft);
}

.tfs-dp-day.tfs-dp-other-month {
  color: var(--tfs-dp-closed);
}

.tfs-dp-day.tfs-dp-disabled,
.tfs-dp-day:disabled {
  color: var(--tfs-dp-closed);
  cursor: not-allowed;
}

.tfs-dp-day.tfs-dp-holiday {
  font-weight: 700;
}

.tfs-dp-day.tfs-dp-today:not(.tfs-dp-selected):not(.tfs-dp-in-range) {
  outline: 1px solid var(--tfs-dp-teal);
  outline-offset: -3px;
  border-radius: 999px;
}

.tfs-dp-day.tfs-dp-selected,
.tfs-dp-day.tfs-dp-range-start,
.tfs-dp-day.tfs-dp-range-end {
  background: var(--tfs-dp-teal);
  color: #fff;
}

.tfs-dp-day.tfs-dp-in-range {
  background: var(--tfs-dp-teal-soft);
  color: var(--dp-text);
}

.tfs-dp-day.tfs-dp-range-start,
.tfs-dp-day.tfs-dp-range-end {
  color: #fff;
}

.tfs-dp-season-marker {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}

.tfs-dp-season-a {
  border-left: 6px solid transparent;
  border-bottom: 6px solid var(--tfs-dp-season-a);
  left: 5px;
  bottom: 5px;
}

.tfs-dp-season-b {
  border-right: 6px solid transparent;
  border-bottom: 6px solid var(--tfs-dp-season-b);
  right: 5px;
  bottom: 5px;
}

[data-bs-theme="dark"] .tfs-dp-season-a,
.dark-mode .tfs-dp-season-a,
body.dark .tfs-dp-season-a,
body.theme-dark .tfs-dp-season-a {
  border-left-width: 4px;
  border-bottom-width: 4px;
}

[data-bs-theme="dark"] .tfs-dp-season-b,
.dark-mode .tfs-dp-season-b,
body.dark .tfs-dp-season-b,
body.theme-dark .tfs-dp-season-b {
  border-right-width: 4px;
  border-bottom-width: 4px;
}

.tfs-dp-bottom-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  margin-top: .9rem;
}

.tfs-dp-season-key {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem 1rem;
  font-size: .92rem;
}

.tfs-dp-season-key a {
  color: var(--tfs-dp-teal);
  font-weight: 700;
  text-decoration: none;
}

.tfs-dp-key-triangle {
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: .3rem;
  vertical-align: middle;
}

.tfs-dp-key-a {
  border-left: 8px solid transparent;
  border-bottom: 8px solid var(--tfs-dp-season-a);
}

.tfs-dp-key-b {
  border-right: 8px solid transparent;
  border-bottom: 8px solid var(--tfs-dp-season-b);
}

.tfs-dp-submit {
  min-height: 48px;
  white-space: nowrap;
}

.tfs-dp-hidden-input {
  display: none !important;
}

@media (max-width: 767.98px) {
  .tfs-dp-controls {
    grid-template-columns: 1fr;
    gap: .75rem;
  }
  .tfs-dp-month-grid {
    grid-template-columns: 1fr;
  }
  .tfs-dp-month + .tfs-dp-month {
    border-left: 0;
    border-top: 1px solid var(--dp-border);
  }
  .tfs-dp-month[data-extra-month="true"] {
    display: none;
  }
  .tfs-dp-bottom-row {
    grid-template-columns: 1fr;
  }
  .tfs-dp-submit {
    width: 100%;
  }
  .tfs-dp-summary {
    font-size: 1.25rem;
  }
}


/* TFS Datepicker V1 polish pass */
.tfs-date-picker[data-variant="drop"]:not(.tfs-dp-open) .tfs-dp-summary {
  display: none;
}

.tfs-dp-month {
  padding: .72rem;
}

.tfs-dp-month-head {
  position: relative;
  display: block;
  min-height: 38px;
  margin-bottom: .55rem;
}

.tfs-dp-month-title {
  display: block;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  line-height: 38px;
  padding: 0 42px;
}

.tfs-dp-nav {
  position: absolute;
  top: 0;
}

.tfs-dp-prev {
  left: 0;
}

.tfs-dp-next {
  right: 0;
}

.tfs-dp-day {
  min-height: 36px;
}

.tfs-dp-weekdays span {
  padding: .22rem 0;
}

@media (max-width: 767.98px) {
  .tfs-dp-day {
    min-height: 37px;
  }
  .tfs-dp-month {
    padding: .8rem;
  }
}


/* TFS Datepicker V1 polish pass 3 */
.tfs-dp-action-row {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  justify-content: flex-end;
}

.tfs-dp-close {
  min-height: 48px;
  display: none;
  white-space: nowrap;
}

.tfs-date-picker[data-variant="drop"] .tfs-dp-close {
  display: inline-flex;
  align-items: center;
}

@media (max-width: 767.98px) {
  .tfs-dp-action-row {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  .tfs-date-picker[data-variant="drop"] .tfs-dp-action-row {
    grid-template-columns: 1fr 1fr;
  }
  .tfs-dp-close,
  .tfs-dp-submit {
    width: 100%;
    justify-content: center;
  }
  .tfs-dp-month-title {
    text-align: center;
    padding: 0 44px;
  }
}


/* TFS Datepicker V1 polish pass 4 */
.tfs-dp-manual-error {
  min-height: 1.1rem;
  margin-top: .25rem;
  color: var(--bs-danger, #dc3545);
  font-size: .78rem;
  line-height: 1.2;
}

.tfs-date-picker[data-variant="drop"]:not(.tfs-dp-open) .tfs-dp-manual-error {
  display: none;
}


/* TFS Datepicker V1 polish pass 6 - hero reviews field */
.tfs-date-picker.tfs-dp-hero-strip .tfs-dp-controls {
  grid-template-columns: minmax(0,1fr) minmax(0,1fr) minmax(190px,.85fr);
}

.tfs-dp-review-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  text-align: center;
  border-radius: .45rem;
  background: var(--bs-body-bg, #fff);
  color: var(--bs-body-color, #202124);
  text-decoration: none;
  padding: .45rem .65rem;
  border: 1px solid rgba(0,0,0,.08);
}

[data-bs-theme="dark"] .tfs-dp-review-link,
.dark-mode .tfs-dp-review-link,
body.dark .tfs-dp-review-link,
body.theme-dark .tfs-dp-review-link {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.12);
  color: var(--bs-body-color, #f4f4f4);
}

.tfs-dp-review-link:hover {
  color: var(--tfs-dp-teal);
  border-color: var(--tfs-dp-teal);
}

.tfs-dp-review-link img {
  max-height: 24px;
  width: auto;
  flex: 0 0 auto;
}

.tfs-dp-review-stars {
  letter-spacing: -.05em;
  color: #f5b301;
  line-height: 1;
  font-size: .95rem;
  white-space: nowrap;
}

.tfs-dp-review-link strong {
  font-size: .82rem;
  line-height: 1.05;
  white-space: normal;
}

@media (max-width: 1199.98px) {
  .tfs-date-picker.tfs-dp-hero-strip .tfs-dp-controls {
    grid-template-columns: 1fr 1fr;
  }
  .tfs-date-picker.tfs-dp-hero-strip .tfs-dp-review-field {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .tfs-date-picker.tfs-dp-hero-strip .tfs-dp-controls {
    grid-template-columns: 1fr;
  }
  .tfs-date-picker.tfs-dp-hero-strip .tfs-dp-review-field {
    grid-column: auto;
  }
  .tfs-dp-review-link {
    min-height: 54px;
  }
}


/* TFS Datepicker final ADMIN-CAL integration tweaks */
.tfs-date-picker.tfs-dp-hero-strip {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
}

/* Keep upper calendar from becoming too wide on desktop/laptop screens */
.tfs-date-picker.tfs-dp-hero-strip .tfs-dp-day {
  min-height: 34px;
}

/* Make holiday H ghosted but visually distinct from normal closed days */
.tfs-dp-day.tfs-dp-holiday,
.tfs-dp-day.tfs-dp-holiday:disabled {
  color: rgba(155, 55, 55, .58);
  font-weight: 800;
}

/* Compact seasonal key: whole label is one link */
.tfs-dp-season-key-link {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem .6rem;
  color: var(--tfs-dp-teal);
  font-weight: 700;
  text-decoration: none;
}

.tfs-dp-season-key-link:hover {
  text-decoration: underline;
}

.tfs-dp-season-key-item {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.tfs-dp-season-sep {
  color: var(--dp-muted);
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .tfs-date-picker.tfs-dp-hero-strip {
    max-width: 100%;
  }
}

/* TFS Datepicker V1 polish pass 7 - final seasonal marker corners + compact pop-open backdrop */
/* Single seasonal soak now sits in the lower-right corner as a down-right marker. */
.tfs-dp-season-a {
  left: auto;
  right: 5px;
  bottom: 5px;
  border-left: 6px solid transparent;
  border-right: 0;
  border-bottom: 6px solid var(--tfs-dp-season-a);
}

/* Future second simultaneous seasonal soak sits in the lower-left corner as a down-left marker. */
.tfs-dp-season-b {
  right: auto;
  left: 5px;
  bottom: 5px;
  border-right: 6px solid transparent;
  border-left: 0;
  border-bottom: 6px solid var(--tfs-dp-season-b);
}

[data-bs-theme="dark"] .tfs-dp-season-a,
.dark-mode .tfs-dp-season-a,
body.dark .tfs-dp-season-a,
body.theme-dark .tfs-dp-season-a {
  border-left-width: 4px;
  border-right-width: 0;
  border-bottom-width: 4px;
}

[data-bs-theme="dark"] .tfs-dp-season-b,
.dark-mode .tfs-dp-season-b,
body.dark .tfs-dp-season-b,
body.theme-dark .tfs-dp-season-b {
  border-right-width: 4px;
  border-left-width: 0;
  border-bottom-width: 4px;
}

/* The upper/pop-open datepicker backdrop should hug the narrowed calendar instead of leaving wide side gutters. */
#tfsFastBookHeroFormV1,
#tfsReservationBlockFormV1,
.book-form:has(.tfs-date-picker.tfs-dp-hero-strip[data-variant="drop"]),
.book-form:has(.tfs-date-picker.tfs-dp-compact[data-variant="drop"]) {
  max-width: 964px;
  margin-left: auto;
  margin-right: auto;
}
