/* Patient portal. Button look is copied from the site's own buttons by portal.js (variables --cbp-btn-*),
   with a gold gradient as the default. Fonts come from the theme. */
:root { --cb-accent: #001636; --cb-btn-image: linear-gradient(135deg, #c9952b 0%, #f0cf7a 50%, #c08a22 100%); --cb-btn-color: #c9952b; --cb-btn-text: #3b2a05; --cb-btn-font: inherit; --cb-btn-size: 16px; --cb-btn-weight: 600; --cb-btn-transform: none; --cb-btn-spacing: normal; --cb-btn-radius: 12px; }
.cbp {
  --cbp-accent: var(--cb-accent, #001636);
  --cbp-ink: #001636; --cbp-muted: #6b7380; --cbp-line: color-mix(in srgb, #001636 13%, #fff); --cbp-soft: color-mix(in srgb, #001636 5%, #fff); --cbp-bad: #c0392b; --cbp-ok: #1f8a5b; --cbp-warn: #b7791f;
  max-width: 820px; margin: 1.5em auto; font-family: inherit; color: var(--cbp-ink); box-sizing: border-box; line-height: 1.5;
}
.cbp *, .cbp *::before, .cbp *::after { box-sizing: border-box; }

/* ---------- buttons ---------- */
.cbp .cbp-btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; text-decoration: none;
  min-height: 50px; padding: 13px 30px; border: 0; border-radius: var(--cb-btn-radius);
  background-color: var(--cb-btn-color); background-image: var(--cb-btn-image); color: var(--cb-btn-text);
  font-family: var(--cb-btn-font); font-size: var(--cb-btn-size); font-weight: var(--cb-btn-weight);
  text-transform: var(--cb-btn-transform); letter-spacing: var(--cb-btn-spacing); line-height: 1.2;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .08); transition: filter .15s, transform .05s, box-shadow .15s;
}
.cbp .cbp-btn:hover { filter: brightness(1.06) saturate(1.05); color: var(--cb-btn-text); box-shadow: 0 8px 20px rgba(0, 0, 0, .12); }
.cbp .cbp-btn:active { transform: translateY(1px); }
.cbp .cbp-btn:focus-visible { outline: 3px solid color-mix(in srgb, var(--cbp-accent) 45%, transparent); outline-offset: 2px; }
.cbp .cbp-btn--block { display: flex; width: 100%; }
.cbp .cbp-btn.is-disabled { opacity: .55; pointer-events: none; }
.cbp .cbp-btn--ghost { background: #fff; background-image: none; color: var(--cbp-ink); border: 1.5px solid var(--cbp-accent); box-shadow: none; min-height: 44px; padding: 10px 22px; font-weight: 600; }
.cbp .cbp-btn--ghost:hover { background: var(--cbp-soft); color: var(--cbp-ink); filter: none; box-shadow: none; }
.cbp .cbp-btn--danger { color: var(--cbp-bad); }
.cbp .cbp-btn--danger:hover { background: #fdf1ef; color: var(--cbp-bad); }
.cbp-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }

/* ---------- login / code / consent: one centred card ---------- */
.cbp-panel { max-width: 460px; margin: 0 auto; text-align: center; background: #fff; border: 1px solid var(--cbp-line); border-radius: 24px; padding: 40px 36px 32px; box-shadow: 0 18px 50px rgba(30, 30, 60, .08); }
.cbp-logo { margin: 0 auto 22px; }
.cbp-logo img { display: block; margin: 0 auto; max-width: 200px; max-height: 90px; width: auto; height: auto; }
.cbp-logo--text { font-size: 1.4em; font-weight: 800; letter-spacing: .02em; }
.cbp-title { margin: 0 0 10px; font-size: 1.6em; line-height: 1.2; }
.cbp-sub { margin: 0 0 26px; color: var(--cbp-muted); }

.cbp-field { position: relative; margin: 0 0 16px; text-align: left; }
.cbp-phonebox { display: flex; align-items: stretch; border: 1.5px solid var(--cbp-line); border-radius: 14px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.cbp-phonebox:focus-within { border-color: var(--cbp-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cbp-accent) 18%, transparent); }
.cbp-prefix { display: grid; place-items: center; padding: 0 16px; background: var(--cbp-soft); color: var(--cbp-ink); font-weight: 700; font-size: 18px; border-right: 1px solid var(--cbp-line); }
.cbp .cbp-phonebox input { border: 0; outline: 0; box-shadow: none; background: transparent; padding: 0 14px; font-size: 18px; font-family: inherit; color: var(--cbp-ink); width: 100%; min-width: 0; margin: 0; height: 58px; }
.cbp .cbp-phonebox input::placeholder { color: #9aa1ad; }
.cbp-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cbp .cbp-field input.cbp-code { display: block; width: 100%; margin: 0 auto; height: 62px; border: 1.5px solid var(--cbp-line); border-radius: 14px; text-align: center; letter-spacing: .55em; padding-left: .55em; font-size: 26px; font-weight: 700; background: #fff; color: var(--cbp-ink); font-family: inherit; }
.cbp .cbp-field input.cbp-code:focus { outline: 0; border-color: var(--cbp-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cbp-accent) 18%, transparent); }

.cbp-note { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; background: var(--cbp-soft); text-align: left; }
.cbp-note--bad { background: #fdf1ef; color: var(--cbp-bad); }
.cbp-fine { margin: 18px 0 0; color: var(--cbp-muted); font-size: 12.5px; line-height: 1.45; }
.cbp-help { margin: 16px 0 0; color: var(--cbp-muted); font-size: 14px; }
.cbp-help a { color: var(--cbp-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.cbp-hint { color: var(--cbp-muted); font-size: .92em; margin: 14px 0 0; }
.cbp-consent { white-space: pre-line; text-align: left; background: var(--cbp-soft); padding: 16px 18px; border-radius: 14px; margin: 0 0 14px; font-size: .95em; }
.cbp-check { display: flex; gap: 12px; align-items: center; justify-content: center; margin: 0 0 18px; cursor: pointer; font-weight: 600; }
.cbp-check input { width: 22px; height: 22px; margin: 0; accent-color: var(--cbp-accent); }

/* ---------- logged-in view ---------- */
.cbp-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; background: var(--cbp-soft); border-radius: 18px; }
.cbp-bar__who { display: flex; flex-direction: column; line-height: 1.3; }
.cbp-bar__lbl { color: var(--cbp-muted); font-size: .85em; }
.cbp-h3 { display: flex; align-items: center; gap: 10px; margin: 2em 0 .7em; font-size: 1.25em; }
.cbp-count { display: inline-grid; place-items: center; min-width: 26px; height: 26px; padding: 0 8px; border-radius: 999px; font-size: 13px; font-weight: 700; background: color-mix(in srgb, var(--cbp-accent) 15%, #fff); color: var(--cbp-accent); }
.cbp-empty { padding: 22px; border: 1.5px dashed var(--cbp-line); border-radius: 18px; text-align: center; color: var(--cbp-muted); margin: 0 0 8px; }
.cbp-empty p { margin: 0 0 12px; }

.cbp-card { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--cbp-line); border-radius: 20px; padding: 18px 20px; margin: 12px 0; box-shadow: 0 6px 20px rgba(30, 30, 60, .05); }
.cbp-card.is-off { opacity: .6; }
.cbp-card__body { flex: 1 1 auto; min-width: 0; }
.cbp-card__title { font-weight: 700; font-size: 1.08em; overflow-wrap: anywhere; }
.cbp-card__line { color: var(--cbp-muted); font-size: .94em; overflow-wrap: anywhere; }
.cbp-card__line--strong { color: var(--cbp-ink); font-weight: 600; text-transform: capitalize; margin: 2px 0; }
.cbp-date { flex: none; width: 64px; padding: 9px 0 8px; border-radius: 16px; text-align: center; background: color-mix(in srgb, var(--cbp-accent) 14%, #fff); color: var(--cbp-accent); display: flex; flex-direction: column; line-height: 1.05; }
.cbp-date__d { font-size: 28px; font-weight: 800; }
.cbp-date__m { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }
.cbp-fileic { flex: none; width: 48px; height: 58px; border-radius: 14px; display: grid; place-items: center; background: color-mix(in srgb, var(--cbp-accent) 14%, #fff); color: var(--cbp-accent); }
.cbp-icon { width: 24px; height: 24px; display: block; }
.cbp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 2px; }
.cbp-chip { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.cbp-chip--ok { background: #e6f5ee; color: var(--cbp-ok); }
.cbp-chip--warn { background: #fdf3e0; color: var(--cbp-warn); }
.cbp-chip--off { background: #eef0f3; color: var(--cbp-muted); }
.cbp-foot { margin-top: 2.4em; padding-top: 1.2em; border-top: 1px solid var(--cbp-line); }

@media (max-width: 520px) {
  .cbp-panel { padding: 28px 20px 24px; border-radius: 20px; }
  .cbp-title { font-size: 1.35em; }
  .cbp-card { padding: 14px; gap: 12px; }
  .cbp-date { width: 54px; }
  .cbp-actions .cbp-btn { width: 100%; }
}
