/*
 * Uoksai theme for the evo-calendar pickers (Figma: homa.lt mūsų design, node 77:2853).
 * The bundle's Tailwind lives in @layer blocks, so these unlayered rules win without !important.
 */

evo-calendar-picker,
evo-time-picker,
[data-bits-floating-content-wrapper] {
  --background: transparent;
  --foreground: var(--champagne-gold, #f5e7d1);
  --popover: var(--champagne-gold, #f5e7d1);
  --popover-foreground: var(--black-olive, #2f3919);
  --accent: rgba(228, 177, 0, 0.3);
  --accent-foreground: var(--black-olive, #2f3919);
  --muted-foreground: var(--black-olive, #2f3919);
  --border: var(--dark-grayish-yellow, #787660);
  --input: var(--dark-grayish-yellow, #787660);
  --ring: var(--pure-yellow, #e4b100);
}

evo-calendar-picker,
evo-time-picker {
  display: block;
  width: 100%;
}

/* ---------------- field row: date | time ---------------- */

.fieldCalendar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.5rem;
  /* bottom: with the form's 1.25rem .fieldPadd this makes the design's 40px gap before the checkboxes */
  margin: 1.62rem 0 1.25rem 0;
}

.fieldCalendar input[type="hidden"] {
  display: none;
}

@media (max-width: 720px) {
  .fieldCalendar {
    grid-template-columns: 1fr;
    row-gap: 1.62rem; /* stacked date/time keep the .fieldText rhythm (its margin-top) */
  }
}

/* both triggers look like .fieldText: underline, champagne body-xl label, icon on the right */
.fieldCalendar .evo-field > button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: calc(1.25rem * 2 + 1.62rem);
  padding: 0;
  margin: 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--dark-grayish-yellow, #787660);
  border-radius: 0;
  box-shadow: none;
  outline: none;
  opacity: 1;
  cursor: pointer;

  color: var(--champagne-gold, #f5e7d1);
  font-family: var(--type-font-font-body, inter);
  font-size: var(--body-scale-body-xl, 1.125rem);
  font-weight: 400;
  line-height: var(--body-lineheight-lineheight, 1.625rem);
  transition: border-color 0.3s ease;
}

.fieldCalendar .evo-field > button:hover,
.fieldCalendar .evo-field > button:focus-visible,
.fieldCalendar .evo-field > button[data-state="open"] {
  background: none;
  border-bottom-color: var(--pure-yellow, #e4b100);
}

/* time stays disabled until a date is picked */
.fieldCalendar .evo-field > button:disabled {
  cursor: not-allowed;
  pointer-events: auto;
  opacity: 0.5;
}

/* the select trigger wraps its label in a span that truncates */
.fieldCalendar .evo-field > button > span {
  font: inherit;
  color: inherit;
}

/* swap the bundled lucide icons for the design's 18px icons */
.fieldCalendar .evo-field > button > svg {
  display: none;
}

.fieldCalendar .evo-field > button::after {
  content: "";
  flex: none;
  width: 18px;
  height: 18px;
  background: url(../img/calendar.svg) center / 18px 18px no-repeat;
}

.fieldCalendar evo-time-picker .evo-field > button::after {
  background-image: url(../img/chevron-down.svg);
  transition: transform 0.3s ease;
}

.fieldCalendar evo-time-picker .evo-field > button[data-state="open"]::after {
  transform: rotate(180deg);
}

/* required but empty → same yellow underline as .fieldText.error */
.id-fieldPicker.error .evo-field > button {
  border-bottom-color: var(--pure-yellow, #e4b100);
}

/* ---------------- dropdowns (portaled to <body>) ---------------- */

[data-bits-floating-content-wrapper] {
  z-index: 3000 !important; /* inline z-index from floating-ui */
}

[data-slot="popover-content"],
[data-slot="select-content"] {
  background: var(--champagne-gold, #f5e7d1);
  color: var(--black-olive, #2f3919);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--type-font-font-body, inter);
}

/* same selector as the bundle's unlayered Geist rule, loaded later → wins */
div[data-bits-floating-content-wrapper] * {
  font-family: var(--type-font-font-body, inter);
}

/* calendar: 12px padding + 7 × 32px cells = 248px wide */
[data-calendar-root] {
  padding: 12px;
  --cell-size: 32px;
}

[data-calendar-header] {
  font-size: 14px;
  line-height: 14px;
  font-weight: 400;
  color: var(--black-olive, #2f3919);
  text-transform: capitalize;
}

[data-calendar-prev-button],
[data-calendar-next-button] {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: none;
  color: var(--black-olive, #2f3919);
  cursor: pointer;
}

[data-calendar-prev-button] svg,
[data-calendar-next-button] svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.25;
}

[data-calendar-prev-button]:hover,
[data-calendar-next-button]:hover {
  background: var(--pure-yellow, #e4b100);
}

[data-calendar-prev-button]:disabled,
[data-calendar-next-button]:disabled {
  opacity: 0.25;
  background: none;
}

/* the bundle spaces the grid in rem, which grows with the site's fluid root size — pin to the design's px */
[data-calendar-grid] {
  margin-top: 16px;
  gap: 4px;
}

[data-calendar-grid] tbody tr {
  margin-top: 8px;
}

[data-calendar-head-cell] {
  box-sizing: border-box;
  width: 32px;
  font-size: 14px;
  line-height: 14px;
  font-weight: 400;
  color: var(--black-olive, #2f3919);
  opacity: 0.5;
}

[data-calendar-cell] {
  background: none;
}

[data-calendar-day] {
  width: 32px;
  height: 32px;
  border-radius: 0;
  font-size: 14px;
  line-height: 14px;
  font-weight: 400;
  color: var(--black-olive, #2f3919);
  background: none;
  opacity: 1;
  cursor: pointer;
}

[data-calendar-day][data-outside-month] {
  opacity: 0.5;
}

[data-calendar-day]:not([data-disabled]):hover {
  background: var(--pure-yellow, #e4b100);
  opacity: 1;
}

[data-calendar-day][data-disabled] {
  opacity: 0.25;
  cursor: not-allowed;
}

[data-calendar-day][data-today]:not([data-selected]) {
  background: none;
  color: var(--pure-yellow, #e4b100);
  opacity: 1;
}

/* yellow text would vanish on the yellow hover fill */
[data-calendar-day][data-today]:not([data-selected]):hover {
  background: var(--pure-yellow, #e4b100);
  color: var(--black-olive, #2f3919);
}

[data-calendar-day][data-selected],
[data-calendar-day][data-selected]:hover {
  background: var(--pure-yellow, #e4b100);
  color: var(--black-olive, #2f3919);
  opacity: 1;
}

/* time list */
[data-select-viewport] {
  padding: 12px;
}

[data-slot="select-item"] {
  padding: 8px 12px;
  border-radius: 0;
  font-size: 14px;
  line-height: 14px;
  color: var(--black-olive, #2f3919);
  cursor: pointer;
}

[data-slot="select-item"][data-highlighted] {
  background: var(--pure-yellow, #e4b100);
  color: var(--black-olive, #2f3919);
}

[data-slot="select-item"][data-selected] {
  background: var(--pure-yellow, #e4b100);
}

[data-slot="select-item"] > span:first-child {
  display: none; /* checkmark slot; selection is shown by the yellow fill */
}
