/* Borrowers' pages (/borrow/), on top of catalogue.css. Phone first. */
[hidden] { display: none !important; }
h2 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 700; color: var(--burgundy); font-size: 1.6rem; line-height: 1.2; margin: 1.75rem 0 0.4rem; }
.small { font-size: 0.9rem; color: var(--muted); }
.lead { color: var(--muted); }
.who { margin: -0.25rem 0 1rem; color: var(--muted); }
.who strong { color: var(--ink); }

/* Buttons: square-ish corners, like the catalogue's search button. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 48px; padding: 0.55rem 1.2rem;
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
  color: var(--blue); background: #fff; border: 1px solid var(--blue); border-radius: 4px;
}
.btn:hover { background: #eef3f8; }
.btn-primary { color: #fff; background: var(--blue); }
.btn-primary:hover { background: var(--burgundy); border-color: var(--burgundy); }
.btn-block { width: 100%; }
.btn-small { min-height: 40px; padding: 0.35rem 0.9rem; font-size: 0.95rem; }
.btn-quiet { border-color: transparent; background: transparent; text-decoration: underline; }
.btn-quiet:hover { background: transparent; }
.btn-danger { color: #9F1D35; border-color: #9F1D35; }
.btn svg { width: 22px; height: 22px; }

/* Forms */
.form { display: grid; gap: 1rem; margin: 1rem 0; }
.field label { display: block; font-weight: 600; color: var(--blue); margin-bottom: 0.35rem; }
.field input {
  width: 100%; min-height: 48px; padding: 0.6rem 0.8rem;
  font: inherit; font-size: 16px; color: var(--ink); background: #fff;
  border: 1px solid #a8a29a; border-radius: 4px;
}
.field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.2); }
.code-input { font-size: 1.6rem !important; letter-spacing: 0.3em; text-align: center; }
.hint { margin: 0.35rem 0 0; font-size: 0.88rem; color: var(--muted); }
.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-top: 0.75rem; }
.row-actions form { margin: 0; }

/* Notices */
.notice { margin: 0.9rem 0; padding: 0.75rem 0.95rem; border: 1px solid #e4e0d6; border-left: 4px solid var(--blue); border-radius: 4px; background: #fff; }
.notice p { margin: 0.25rem 0; }
.notice-ok { border-left-color: var(--green); }
.notice-error { border-left-color: #9F1D35; }
.notice-warn { border-left-color: var(--gold); }
.done-title { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.45rem; font-weight: 700; color: var(--blue); line-height: 1.2; }

/* A book */
.card { margin: 1rem 0; padding: 1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.card + .card { border-top: 0; margin-top: -1rem; }
.card-head { display: flex; gap: 1rem; align-items: flex-start; }
.card .title { font-size: 1.5rem; }
.card-compact .title { font-size: 1.25rem; }
.card-actions { margin: 0.9rem 0 0; }
.card-actions .hint { margin-top: 0.5rem; }
.card .notice { margin-bottom: 0; }

/* Finding a book, and your books */
.find .scan-btn { margin: 0.25rem 0 0.25rem; }
.find .search { margin-top: 1rem; }
.loans { list-style: none; margin: 0; padding: 0; }
.loans li { padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.loans form { margin-top: 0.5rem; }
.loan-title { margin: 0; font-weight: 700; color: var(--blue); }
.loans .meta { margin: 0.15rem 0 0; }
.late { margin: 0.15rem 0 0; color: #9F1D35; font-weight: 600; font-size: 0.95rem; }
.return-box { margin: 1rem 0 0; padding: 0.75rem 0.95rem; border: 1px solid var(--gold); border-radius: 4px; }

/* Who's borrowing */
.people { list-style: none; margin: 1rem 0; padding: 0; border: 1px solid var(--line); border-radius: 4px; }
.people li + li { border-top: 1px solid var(--line); }
.people form { margin: 0; }
.choice { display: block; width: 100%; min-height: 52px; padding: 0.7rem 0.9rem; font: inherit; font-weight: 600; text-align: left; color: var(--ink); background: #fff; border: 0; cursor: pointer; }
.choice:hover { background: #eef3f8; }
.choice.is-current { box-shadow: inset 4px 0 0 var(--blue); }
.choice small { display: block; font-weight: 400; color: var(--green); }

/* The camera scanner (scanner.js), as on the volunteers' pages */
.scanner { position: fixed; inset: 0; z-index: 100; background: #000; color: #fff; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scanner-frame {
  position: absolute; left: 8%; right: 8%; top: 36%; height: 20%;
  border: 3px solid var(--gold); border-radius: 8px;
  box-shadow: 0 0 0 100vmax rgba(0, 0, 0, 0.4); pointer-events: none;
}
.scanner-qr .scanner-frame, .scanner-book .scanner-frame { left: 50%; right: auto; top: 50%; width: min(78vw, 70vh); height: min(56vw, 50vh); transform: translate(-50%, -50%); }
.scanner-top { position: absolute; top: 0; left: 0; right: 0; margin: 0; padding: calc(1rem + env(safe-area-inset-top)) 1rem 1rem; text-align: center; font-weight: 600; text-shadow: 0 1px 3px #000; }
.scanner-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 1rem 1rem calc(1.25rem + env(safe-area-inset-bottom)); display: flex; justify-content: center; }
.scanner .btn { min-width: 9rem; }
