/* Reset + base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  font-size: 18px;
  line-height: 1.4;
  color: #1a1a1a;
  background: #f5f5f7;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

/* Card */
.card {
  width: 100%;
  max-width: 32rem;
  background: #ffffff;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.office-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 500;
  color: #666;
  text-align: center;
}

.prompt {
  margin: 0.5rem 0 1.5rem;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
}

/* Success screen left-aligns the heading + body lines so the
   completion message reads as a confirmation, not a marquee. */
.thanks-screen,
.thanks-screen .office-name,
.thanks-screen .prompt {
  text-align: left;
}

/* Inputs / fields */
.field {
  border: none;
  padding: 0;
  margin: 0 0 1.25rem;
}

.field legend {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.field label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 1rem;
}

.field input[type="radio"],
.field input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

input[type="password"],
input[type="time"] {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1.25rem;
  border: 1px solid #d0d0d4;
  border-radius: 0.5rem;
  background: #ffffff;
  margin-bottom: 0.5rem;
}

input[type="password"]:focus,
input[type="time"]:focus {
  outline: 2px solid #0a84ff;
  outline-offset: 2px;
  border-color: #0a84ff;
}

input[type="password"] {
  letter-spacing: 0.5em;
  text-align: center;
}

/* Fee schedule block */
.fee-schedule .fee-text {
  background: #fafafa;
  border: 1px solid #e5e5e7;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  max-height: 12rem;
  overflow-y: auto;
}

.fee-schedule .acknowledge {
  font-weight: 500;
}

.fee-items {
  list-style: none;
  padding: 0;
  margin: 0 0 0.5rem;
}

.fee-items li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid #e5e5e7;
}

.fee-items li:last-child {
  border-bottom: none;
}

.fee-name {
  font-weight: 500;
}

.fee-price {
  font-variant-numeric: tabular-nums;
}

.fee-notes {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #555;
}

/* Buttons */
button {
  font: inherit; /* inherit font-size and family */
  cursor: pointer;
}

.primary {
  display: block;
  width: 100%;
  padding: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  background: #0a84ff;
  border: none;
  border-radius: 0.5rem;
  margin-top: 0.5rem;
}

.primary:hover {
  background: #0070e5;
}

.primary:disabled {
  background: #b0b0b8;
  cursor: not-allowed;
}

.secondary {
  display: block;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 500;
  color: #1a1a1a;
  background: #f0f0f3;
  border: 1px solid #d0d0d4;
  border-radius: 0.5rem;
}

.secondary:hover {
  background: #e5e5ea;
}

.link {
  display: block;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #0a84ff;
  background: transparent;
  border: none;
  text-align: center;
}

.link:hover {
  text-decoration: underline;
}

/* Error message */
.error {
  color: #d32f2f;
  font-size: 0.95rem;
  margin: 0 0 0.5rem;
  text-align: center;
}

/* Dialog (logout / reset confirmation) */
dialog {
  border: none;
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 22rem;
  width: calc(100% - 2rem);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

dialog h2 {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
}

dialog p {
  margin: 0 0 1.5rem;
  color: #555;
}

.dialog-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.dialog-buttons .secondary,
.dialog-buttons .primary {
  width: 100%;
}
