:root {
  --ta-time-brand: #fec107;
  --ta-time-ink: #0b0f14;
  --ta-time-muted: #667085;
  --ta-time-face: #f2f4f7;
  --ta-time-border: #e4e7ec;
}

body.ta-time-picker-open {
  overflow: hidden;
}

.ta-time-dialog {
  width: min(344px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--ta-time-ink);
  background: #fff;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(11, 15, 20, .28);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.ta-time-dialog::backdrop {
  background: rgba(11, 15, 20, .56);
  backdrop-filter: blur(1px);
}

.ta-time-dialog__panel {
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 24px);
  padding: 12px;
}

.ta-time-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ta-time-face {
  position: relative;
  flex: 0 0 auto;
  width: min(320px, calc(100vw - 48px));
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 50%;
  background: var(--ta-time-face);
  user-select: none;
  touch-action: manipulation;
}

.ta-time-number {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  transform: translate(-50%, -50%);
  color: var(--ta-time-ink);
  background: transparent;
  border: 0;
  border-radius: 50%;
  font-size: .88rem;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: background-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.ta-time-number--inner {
  width: 36px;
  height: 36px;
  color: #475467;
  font-size: .78rem;
}

.ta-time-number:hover,
.ta-time-number:focus-visible {
  background: rgba(254, 193, 7, .22);
  outline: none;
  box-shadow: 0 0 0 3px rgba(254, 193, 7, .2);
}

.ta-time-number.is-selected {
  color: var(--ta-time-ink);
  background: var(--ta-time-brand);
  box-shadow: 0 3px 10px rgba(151, 113, 0, .24);
}

.ta-time-hand {
  --ta-time-hand-angle: 0deg;
  --ta-time-hand-length: 43%;
  position: absolute;
  z-index: 1;
  inset: 0;
  transform: rotate(var(--ta-time-hand-angle));
  pointer-events: none;
  transition: transform .15s ease;
}

.ta-time-hand span {
  position: absolute;
  width: 2px;
  height: var(--ta-time-hand-length);
  bottom: 50%;
  left: calc(50% - 1px);
  background: var(--ta-time-brand);
  border-radius: 2px;
}

.ta-time-center {
  position: absolute;
  z-index: 4;
  width: 10px;
  height: 10px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--ta-time-brand);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(11, 15, 20, .08);
  pointer-events: none;
}

.ta-time-dialog button:focus-visible {
  outline: 3px solid rgba(254, 193, 7, .35);
  outline-offset: 2px;
}

@media (max-width: 380px), (max-height: 650px) {
  .ta-time-dialog__panel {
    padding: 10px;
  }

  .ta-time-face {
    width: min(288px, calc(100vw - 44px), calc(100dvh - 44px));
    min-width: 240px;
  }

  .ta-time-number {
    width: 36px;
    height: 36px;
    font-size: .82rem;
  }

  .ta-time-number--inner {
    width: 32px;
    height: 32px;
    font-size: .72rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ta-time-number,
  .ta-time-hand {
    transition: none;
  }
}
