/* Hours styles, copied from the original site. Every selector is scoped to
   .tool-hours and IDs carry the "hc-" prefix so this sheet only affects this tool. */

.tool-hours .flip {
  pointer-events: auto;
  width: min(520px, 100%);
  perspective: 1600px;
}

.tool-hours .flip-inner {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
}

.tool-hours .flip.flipped .flip-inner {
  transform: rotateY(180deg);
}

.tool-hours .face {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.75rem 1.75rem 1.5rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.tool-hours .face-back {
  position: absolute;
  inset: 0;
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 1rem;
}

.tool-hours .icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--text-dim);
  background: none;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}

.tool-hours .icon-btn:hover {
  color: #fff; background: rgba(84, 129, 193, 0.3);
}

.tool-hours .icon-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 1px;
  color: #fff;
}

.tool-hours .back-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.tool-hours .back-btn {
  margin-left: -4px;
}

.tool-hours h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.tool-hours .ref-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
}

.tool-hours .ref-scroll:focus-visible {
  outline: 2px solid #fff;
}

.tool-hours .ref-table {
  width: 100%;
  border-collapse: collapse;
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 0.95rem;
}

.tool-hours .ref-table th {
  position: sticky;
  top: 0;
  background: #142a47;
  color: var(--text-dim);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  padding: 0.5rem 0.9rem;
  border-bottom: 1px solid var(--line);
}

.tool-hours .ref-table td {
  padding: 0.3rem 0.9rem;
  border-bottom: 1px solid rgba(84, 129, 193, 0.15);
}

.tool-hours .ref-table th:not(:first-child),
.tool-hours .ref-table td:not(:first-child) {
  text-align: right;
}

.tool-hours h1 {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.tool-hours .intro {
  margin: 0 0 1.25rem;
  color: var(--text-dim);
  font-size: 0.95rem;
  line-height: 1.4;
}

.tool-hours .field {
  margin-bottom: 1rem;
}

.tool-hours label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.95rem;
}

.tool-hours input[type="text"],
.tool-hours input[type="date"],
.tool-hours select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  font-size: 1.05rem;
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.tool-hours input[type="text"]::placeholder {
  color: rgba(185, 201, 223, 0.55);
}

.tool-hours input[type="text"]:focus,
.tool-hours input[type="date"]:focus,
.tool-hours select:focus {
  outline: none;
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(84, 129, 193, 0.6);
}

.tool-hours input[aria-invalid="true"] {
  border-color: var(--error);
}

.tool-hours .hint,
.tool-hours .error {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.tool-hours .hint {
  color: var(--text-dim);
}

.tool-hours .error {
  color: var(--error);
}

.tool-hours .btn {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: rgba(84, 129, 193, 0.25);
  border: 1px solid var(--atp-blue);
  border-radius: 6px;
  padding: 0.55rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.tool-hours .btn:hover:not(:disabled) {
  background: rgba(84, 129, 193, 0.45);
}

.tool-hours .btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
}

.tool-hours .btn-primary {
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  background: var(--atp-blue);
}

.tool-hours .btn-primary:hover:not(:disabled) {
  background: #6a94d0;
}

.tool-hours .btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.tool-hours .results {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.tool-hours .summary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.45rem 1rem;
  margin: 0;
}

.tool-hours .summary dt {
  color: var(--text-dim);
  font-weight: 600;
}

.tool-hours .summary dd {
  margin: 0;
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 1.02rem;
  word-break: break-word;
}

.tool-hours .note {
  margin: 0.9rem 0 0;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.tool-hours .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.tool-hours .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  line-height: 0;
}

.tool-hours .reset-btn {
  margin-left: auto;
}

.tool-hours .status {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.tool-hours .ip-list {
  margin: 0.9rem 0 0;
  max-height: 320px;
  overflow: auto;
  padding: 0.6rem 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: Consolas, "Cascadia Mono", "Courier New", monospace;
  font-size: 0.92rem;
  line-height: 1.45;
}

.tool-hours .ip-list:focus-visible {
  outline: 2px solid #fff;
}

@media (max-width: 480px) {
  .tool-hours .ref-table {
    font-size: 0.78rem;
  }

  .tool-hours .ref-table th,
  .tool-hours .ref-table td {
    padding-left: 0.4rem; padding-right: 0.4rem;
  }

  .tool-hours .face {
    padding: 1.25rem 1.1rem;
  }

  .tool-hours .face-back {
    padding: 0.9rem 0.9rem;
  }

  .tool-hours h1 {
    font-size: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tool-hours .btn,
  .tool-hours .icon-btn,
  .tool-hours .flip-inner,
  .tool-hours .seg-btn,
  .tool-hours .tab {
    transition: none;
  }
}

.tool-hours .status:empty {
  display: none;
}

.tool-hours .title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.tool-hours .title-row .icon-btn {
  margin-top: 0.2rem; margin-right: -4px;
}

.tool-hours .tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0.6rem 0 0.9rem;
  border-bottom: 1px solid var(--line);
}

.tool-hours .tab {
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-dim);
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  padding: 0.6rem 0.5rem 0.55rem;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tool-hours .tab:hover {
  color: #fff; background: rgba(84, 129, 193, 0.15);
}

.tool-hours .tab[aria-selected="true"] {
  color: #fff; border-bottom-color: var(--atp-blue);
}

.tool-hours .tab:focus-visible {
  outline: 2px solid #fff; outline-offset: -2px;
}

.tool-hours input[type="date"] {
  color-scheme: dark;
  min-height: 2.75rem;
}

.tool-hours input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.75;
}

.tool-hours select {
  font-family: inherit;
  font-size: 0.95rem;
  color-scheme: dark;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23b9c9df' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
}

.tool-hours select option {
  background: #142a47; color: #fff;
}

.tool-hours input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.tool-hours .options {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.tool-hours .option-label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.tool-hours .option select {
  padding-top: 0.5rem; padding-bottom: 0.5rem;
}

.tool-hours .seg {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
  flex: 0 0 auto;
}

.tool-hours .seg-btn {
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  background: none;
  border: none;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tool-hours .seg-btn + .seg-btn {
  border-left: 1px solid var(--line);
}

.tool-hours .seg-btn:hover {
  color: #fff; background: rgba(84, 129, 193, 0.3);
}

.tool-hours .seg-btn[aria-pressed="true"] {
  color: #fff; background: var(--atp-blue);
}

.tool-hours .seg-btn:focus-visible {
  outline: 2px solid #fff; outline-offset: -2px;
}

.tool-hours .time-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.tool-hours .time-row .time-input {
  flex: 1 1 auto; min-width: 0;
}

.tool-hours .ampm .seg-btn {
  padding: 0 0.75rem;
}

.tool-hours.clock-24 #hc-panel-hours .ampm {
  display: none;
}

.tool-hours .label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.tool-hours .label-text {
  font-weight: 600; font-size: 0.95rem;
}

.tool-hours .optional {
  font-weight: 400; color: var(--text-dim); font-size: 0.85rem;
}

.tool-hours .link-btn {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: #9dbbe6;
  background: none;
  border: none;
  padding: 0.15rem 0.3rem;
  border-radius: 4px;
  cursor: pointer;
}

.tool-hours .link-btn:hover {
  color: #fff; text-decoration: underline;
}

.tool-hours .link-btn:focus-visible {
  outline: 2px solid #fff;
}

.tool-hours .link-btn:disabled {
  opacity: 0.45; cursor: not-allowed; text-decoration: none;
}

.tool-hours .breaks {
  display: grid; gap: 0.5rem;
}

.tool-hours .breaks:empty {
  display: none;
}

.tool-hours .break-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tool-hours .break-row input {
  flex: 1 1 auto; min-width: 0;
}

.tool-hours .break-unit {
  color: var(--text-dim);
  font-size: 0.88rem;
  white-space: nowrap;
}

.tool-hours .break-row .icon-btn {
  flex: 0 0 auto;
}

.tool-hours .check {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.6rem 0 0;
  font-weight: 400;
  font-size: 0.9rem;
  color: var(--text-dim);
  cursor: pointer;
}

.tool-hours .check input {
  width: 1rem; height: 1rem; accent-color: var(--atp-blue); margin: 0;
}

.tool-hours .dt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 0.5rem;
}

.tool-hours .swap-row {
  display: flex;
  justify-content: center;
  margin: -0.4rem 0 0.2rem;
}

.tool-hours .swap-row .icon-btn {
  border-radius: 6px;
}

.tool-hours .big {
  margin: 0 0 0.9rem;
  font-size: 1.9rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.tool-hours .big .sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-dim);
  letter-spacing: 0;
}

.tool-hours .ref-notes {
  padding: 0.75rem 0.9rem 0.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-dim);
}

.tool-hours .ref-notes h3 {
  margin: 0 0 0.4rem;
  font-size: 0.95rem;
  color: #fff;
}

.tool-hours .ref-notes p {
  margin: 0 0 0.6rem;
}

.tool-hours .ref-notes strong {
  color: #fff; font-weight: 600;
}

.tool-hours .ref-table th:nth-child(3),
.tool-hours .ref-table td:nth-child(3) {
  text-align: left; padding-left: 1.5rem; border-left: 1px solid rgba(84, 129, 193, 0.3);
}

.tool-hours .offscreen {
  position: fixed;
  top: 0;
  left: -9999px;
  opacity: 0;
}

@media (max-width: 480px) {
  .tool-hours .options {
    grid-template-columns: 1fr;
  }

  .tool-hours .dt-row {
    grid-template-columns: 1fr;
  }

  .tool-hours .big {
    font-size: 1.6rem;
  }

  .tool-hours .tab {
    font-size: 0.88rem; padding-left: 0.25rem; padding-right: 0.25rem;
  }
}
