/* Public check-in page: patient request form, timing choices, and offline state. */

/* Form-only utility classes */
.form-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.time-option-label {
  margin: 0;
  font-weight: normal;
}

:root {
  --navy: #163f4c;
  --green: #168553;
  --green-dark: #0e6840;
  --focus: #f0b429;
  --text: #1d2a30;
  --muted: #5e6f7a;
  --bg: #edf3f0;
  --card: #ffffff;
  --line: #dfe8e5;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(
    135deg,
    rgba(22, 63, 76, 0.08),
    rgba(22, 133, 83, 0.06)
  );
  font-family: Arial, sans-serif;
  color: var(--text);
}
.card {
  width: min(680px, calc(100vw - 24px));
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 22px 50px rgba(19, 48, 58, 0.12);
  padding: 28px;
}
h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 36px);
  color: var(--navy);
}
.pharmacy-profile > span {
  display: block;
  margin-bottom: 7px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}
.pharmacy-contact {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0;
  padding: 14px 0;
  border-block: 1px solid var(--line);
}
.pharmacy-contact address {
  color: var(--muted);
  font-style: normal;
  line-height: 1.5;
}
.contact-links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: flex-end;
  gap: 8px;
}
.contact-links a {
  padding: 7px 9px;
  border: 1px solid #b8d4ca;
  border-radius: 4px;
  color: #116b50;
  text-decoration: none;
  transition: background-color 160ms ease, border-color 160ms ease,
    color 160ms ease, transform 160ms ease;
}
.contact-links a:hover {
  border-color: var(--green);
  background: #e5f4ed;
  color: var(--green-dark);
  transform: translateY(-1px);
}
.opening-hours {
  margin: 16px 0;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.opening-hours summary {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-inline: -10px;
  padding: 10px 38px 10px 10px;
  border-radius: 6px;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  transition: background-color 160ms ease, color 160ms ease;
}
.opening-hours summary::-webkit-details-marker {
  display: none;
}
.opening-hours summary::after {
  position: absolute;
  right: 14px;
  width: 9px;
  height: 9px;
  border-right: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  content: "";
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}
.opening-hours summary:hover {
  background: #e5f4ed;
  color: var(--green-dark);
}
.opening-hours summary strong {
  color: var(--green);
  font-size: 14px;
  text-align: right;
}
.opening-hours[open] summary {
  margin-bottom: 8px;
}
.opening-hours[open] summary::after {
  transform: rotate(45deg);
}
.opening-hours dl {
  margin-bottom: 0;
}
.opening-hours dl div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 5px 0;
}
.opening-hours dt {
  font-weight: 700;
}
.opening-hours dd {
  margin: 0;
  color: var(--muted);
}
.prescription-information {
  margin: 18px 0;
  padding: 14px;
  border-left: 4px solid var(--green);
  background: #f1f8f5;
}
.prescription-information h2,
.request-title {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 20px;
}
.prescription-information p {
  margin: 0;
  white-space: pre-line;
}
.request-title {
  margin-top: 24px;
}
p {
  margin: 0 0 18px;
  color: var(--muted);
  line-height: 1.5;
}
.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #eafaf4;
  border: 1px solid #ccead8;
  color: #155a3d;
  font-weight: bold;
}
.alert.error {
  background: #fff3f1;
  border-color: #f3d1c9;
  color: #8f392d;
}
form {
  display: grid;
  gap: 14px;
}
label {
  display: grid;
  gap: 6px;
  font-weight: bold;
  color: var(--text);
}
input,
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #ccd8d4;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
input:hover,
textarea:hover,
select:hover {
  border-color: #7cae9c;
}
input[type="checkbox"] {
  width: auto;
  min-height: auto;
  margin-right: 8px;
}
textarea {
  min-height: 120px;
  resize: vertical;
}
button {
  min-height: 48px;
  border: none;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px 0 rgba(10, 78, 47, 0.18);
  transition: background-color 160ms ease, box-shadow 160ms ease,
    transform 160ms ease;
}
button:hover:not(:disabled) {
  background: var(--green-dark);
  box-shadow: 0 6px 14px rgba(10, 78, 47, 0.24);
  transform: translateY(-2px);
}
button:active:not(:disabled) {
  box-shadow: 0 2px 5px rgba(10, 78, 47, 0.22);
  transform: translateY(0);
}
button:disabled {
  opacity: 0.58;
  cursor: wait;
  box-shadow: none;
}
.time-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease,
    box-shadow 160ms ease, transform 160ms ease;
}
.time-option:hover {
  border-color: var(--green);
  background: #eef8f3;
  box-shadow: 0 4px 12px rgba(22, 63, 76, 0.09);
  transform: translateY(-1px);
}
.time-option:has(input:checked) {
  border-color: var(--green);
  background: #e5f4ed;
}
.time-option:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.time-option input[type="radio"] {
  margin: 0;
  width: auto;
  accent-color: var(--green);
}
.time-option-label {
  cursor: pointer;
}
button:focus-visible,
.contact-links a:focus-visible,
.opening-hours summary:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  border-color: var(--green-dark);
  box-shadow: 0 0 0 4px rgba(240, 180, 41, 0.2);
}
.custom-time-fields {
  display: none;
  gap: 10px;
  margin-top: 10px;
}
.custom-time-fields.active {
  display: grid;
}
.custom-time-fields input {
  flex: 1;
}
.privacy-notice {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid #b8d4ca;
  border-left: 4px solid var(--green);
  border-radius: 6px;
  background: #f1f8f5;
  color: var(--text);
  line-height: 1.45;
}
.privacy-notice a {
  color: var(--green-dark);
  font-weight: 700;
}
.privacy-notice a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.subtle {
  margin-top: 14px;
  font-size: 14px;
  color: var(--muted);
}
.offline-notice {
  display: none;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #e7c96b;
  border-radius: 8px;
  background: #fff4d6;
  color: #735400;
  font-weight: bold;
}
body.is-offline .offline-notice {
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  .contact-links a,
  .opening-hours summary,
  .opening-hours summary::after,
  input,
  textarea,
  select,
  button,
  .time-option {
    transition: none;
  }
}
@media (max-width: 560px) {
  .pharmacy-contact {
    flex-direction: column;
  }
  .contact-links {
    justify-content: flex-start;
  }
  .opening-hours summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .opening-hours summary strong {
    text-align: left;
  }
}
