/* TimePicker Component Styles
   Dropdown = .mint-popover, slots = .mint-menu-item (2d, 8c); the __dropdown
   and __slot classes stay as aliases and own placement / slot specifics. */

.mint-time-picker {
  position: relative;
}

/* Input wrapper */
.mint-time-picker__input-wrapper {
  position: relative;
}

/* Trigger follows the field rules (1e) + clock icon; value in mono tabular. */
.mint-time-picker__input {
  width: 100%;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  cursor: pointer;
  padding-right: 2.5rem;
  box-sizing: border-box;
}

.mint-time-picker__input::placeholder {
  font-family: var(--font-sans);
}

.mint-time-picker__input:hover:not(:disabled) {
  border-color: var(--_field-border-hover);
}

.mint-time-picker__input:focus-visible,
.mint-time-picker__input[aria-expanded='true'] {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: var(--focus-ring-soft);
}

.mint-time-picker__input--sm {
  padding: 0.375rem 0.625rem;
  font-size: 0.8125rem;
}

.mint-time-picker__input--md {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
}

.mint-time-picker__input--lg {
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.mint-time-picker__input--error,
.mint-time-picker__input--error:hover:not(:disabled) {
  border-color: var(--mint-error);
}

.mint-time-picker__input--error:focus-visible,
.mint-time-picker__input--error[aria-expanded='true'] {
  border-color: var(--mint-error);
  box-shadow: var(--focus-ring-soft-error);
}

.mint-time-picker__input--disabled {
  cursor: not-allowed;
  background-color: var(--bg-tertiary);
  color: var(--text-muted);
}

/* Clock icon */
.mint-time-picker__icon {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  display: flex;
  align-items: center;
  padding-right: 0.75rem;
  pointer-events: none;
}

.mint-time-picker__icon svg {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--text-secondary);
}

/* Clear button */
.mint-time-picker__clear-btn {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 1.75rem;
  display: flex;
  align-items: center;
  padding: 0 0.25rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: color 150ms ease;
}

.mint-time-picker__clear-btn:hover {
  color: var(--text-primary);
}

.mint-time-picker__clear-btn svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Dropdown — placement only; the look is .mint-popover. */
.mint-time-picker__dropdown {
  position: absolute;
  z-index: 50;
  margin-top: 0.25rem;
  width: 100%;
  min-width: 10rem;
  overflow: hidden;
}

/* Slot list */
.mint-time-picker__list {
  max-height: 16rem;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  list-style: none;
}

/* Slot = menu item; the time is mono tabular. Selected = trailing check + primary text. */
.mint-time-picker__slot {
  white-space: nowrap;
}

.mint-time-picker__slot-time {
  flex: none;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.mint-time-picker__slot--active .mint-time-picker__slot-time {
  font-weight: 600;
}

.mint-time-picker__slot .mint-menu-item__check {
  margin-left: auto;
}

/* Unavailable slots stay readable (no opacity). */
.mint-time-picker__slot[aria-disabled='true'] {
  color: var(--text-secondary);
}

/* The reason sits inline between the time and the check column (8c). */
.mint-time-picker__slot-reason {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

/* Transition classes */
.mint-time-picker__dropdown-enter-active {
  transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}

.mint-time-picker__dropdown-leave-active {
  transition: opacity 0.075s ease-in, transform 0.075s ease-in;
}

.mint-time-picker__dropdown-enter-from,
.mint-time-picker__dropdown-leave-to {
  opacity: 0;
  transform: scale(0.95);
}

.mint-time-picker__dropdown-enter-to,
.mint-time-picker__dropdown-leave-from {
  opacity: 1;
  transform: scale(1);
}

@media (prefers-reduced-motion: reduce) {
  .mint-time-picker__input,
  .mint-time-picker__clear-btn,
  .mint-time-picker__dropdown-enter-active,
  .mint-time-picker__dropdown-leave-active {
    transition: none;
  }
}
