/* Shared portal chrome — one stylesheet for the patient, caregiver and family
   views. Medical views (patient/caregiver) use the patient-portal metrics;
   body.mode-family switches the same classes to the family-portal metrics. */
html, body { margin: 0; padding: 0; background: #FAF6EF; }
* { box-sizing: border-box; }
body { font-family: 'Karla', sans-serif; color: #2A211A; }
textarea, input, select { font-family: 'Karla', sans-serif; }
textarea:focus, input:focus, select:focus { outline: none; border-color: #B4552F !important; }
a { color: #B4552F; } a:hover { color: #9C4626; }
button { font-family: 'Karla', sans-serif; }
.pp-list-row:last-child { border-bottom: none !important; }
.pp-sidebar { display: none; }

/* Medical breakpoints (patient/caregiver design) */
@media (max-width: 736px) {
  body.mode-medical .pp-wrap { padding: 22px 16px 60px !important; }
  body.mode-medical .pp-grid2 { grid-template-columns: 1fr !important; }
  body.mode-medical .pp-vital-form-grid { grid-template-columns: 1fr !important; }
  body.mode-medical .pp-vital-log-row { flex-wrap: wrap; row-gap: 4px; }
  body.mode-medical .pp-vital-log-label { width: 100% !important; }
  body.mode-medical .pp-vital-log-value { width: auto !important; }
  body.mode-medical .pp-vital-log-date { margin-left: 0 !important; text-align: left !important; width: 100%; }
  body.mode-medical .pp-list-row { flex-wrap: wrap; row-gap: 10px; }
  body.mode-medical .pp-list-row > button, body.mode-medical .pp-list-row > a, body.mode-medical .pp-list-row > div:last-child:not(:first-child) > button { width: 100%; text-align: center; }
  body.mode-medical .pp-list-row > div:first-child { min-width: 0; width: 100%; }
  body.mode-medical .pp-list-row .pp-row-actions { width: 100%; }
  body.mode-medical .pp-list-row .pp-row-actions button, body.mode-medical .pp-list-row .pp-row-actions a { flex: 1; text-align: center; }
  body.mode-medical .pp-vital-detail-grid { grid-template-columns: 1fr !important; }
  body.mode-medical .pp-profile-text { display: none !important; }
  body.mode-medical .pp-back-home { display: none !important; }
}
@media (min-width: 737px) { body.mode-medical .pp-profile-popover { display: none !important; } }
@media (min-width: 1035px) {
  body.mode-medical .pp-vitals-grid { grid-template-columns: repeat(5, 1fr) !important; }
  body.mode-medical .pp-sidebar { display: block !important; }
  body.mode-medical .pp-hamburger { display: none !important; }
  body.mode-medical .pp-shell { display: flex; gap: 36px; align-items: flex-start; }
}

/* Family breakpoints (family design) */
@media (max-width: 640px) {
  body.mode-family .pp-wrap { padding: 22px 16px 60px !important; }
  body.mode-family .pp-grid2 { grid-template-columns: 1fr !important; }
  body.mode-family .pp-profile-text { display: none !important; }
  body.mode-family .pp-back-home { display: none !important; }
  body.mode-family .pp-list-row { flex-wrap: wrap; row-gap: 10px; }
  body.mode-family .pp-list-row .pp-row-actions { width: 100%; }
  body.mode-family .pp-list-row .pp-row-actions button, body.mode-family .pp-list-row .pp-row-actions a { flex: 1; text-align: center; }
}
@media (min-width: 641px) { body.mode-family .pp-profile-popover { display: none !important; } }
@media (min-width: 900px) {
  body.mode-family .pp-sidebar { display: block !important; }
  body.mode-family .pp-hamburger { display: none !important; }
  body.mode-family .pp-shell { display: flex; gap: 28px; align-items: flex-start; }
}

@media print {
  @page { margin: 0.5in; }
  html, body { height: auto !important; overflow: visible !important; background: #FFFFFF !important; }
  .pp-shell, .pp-hamburger, .portal-header { display: none !important; }
  .pp-print-toolbar { display: none !important; }
  .pp-print-overlay { position: static !important; inset: auto !important; background: none !important; padding: 0 !important; display: block !important; overflow: visible !important; height: auto !important; }
  .pp-print-doc-wrapper { width: auto !important; max-width: none !important; margin: 0 !important; }
  [data-print-area] { box-shadow: none !important; }
}

.portal-loading { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 120px 0; color: #5C4F42; font-size: 15px; }
.portal-spinner { width: 42px; height: 42px; border: 4px solid #F0E2D3; border-top-color: #B4552F; border-radius: 50%; animation: pspin 0.8s linear infinite; margin-bottom: 12px; }
@keyframes pspin { to { transform: rotate(360deg); } }

/* Picker loader — the same treatment the review booking page uses: the
   month grid stays visible but dimmed, with a spinner card over it, and
   shimmer bars where the times will land. */
.pp-ld-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 5px; opacity: 0.4; }
.pp-ld-day { display: flex; align-items: center; justify-content: center; height: 38px;
  font-size: 17px; font-weight: 700; color: #A69884; }
.pp-checking { position: absolute; inset: 52px 0 0; display: flex; align-items: center;
  justify-content: center; z-index: 3; }
.pp-checking-card { background: rgba(253,250,245,0.96); border: 1px solid #EFE4D4; border-radius: 14px;
  box-shadow: 0 12px 36px rgba(42,33,26,0.12); padding: 22px 26px; display: flex; flex-direction: column;
  align-items: center; text-align: center; max-width: 88%; }
.pp-checking-card strong { font-size: 16px; color: #2A211A; }
.pp-checking-card span { font-size: 15px; color: #8A7A6A; margin-top: 3px; }
.pp-spinner { width: 34px; height: 34px; border: 3.5px solid #F0E2D3; border-top-color: #B4552F;
  border-radius: 50%; animation: ppspin 0.8s linear infinite; margin: 0 0 12px; }
@keyframes ppspin { to { transform: rotate(360deg); } }
.pp-skel-note { font-size: 16px; color: #6B5D50; line-height: 1.55; margin: 0 0 20px; }
.pp-skel-bar { height: 14px; border-radius: 999px; margin-bottom: 16px;
  background: linear-gradient(90deg, #EFE4D4 25%, #F9F3E9 50%, #EFE4D4 75%);
  background-size: 200% 100%; animation: ppshimmer 1.4s ease-in-out infinite; }
@keyframes ppshimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* Moved-appointment confirmation — the same treatment the review booking
   gives a new one, at portal type sizes. */
.pp-modal-back { position: fixed; inset: 0; background: rgba(42,33,26,0.42); z-index: 120;
  display: flex; align-items: center; justify-content: center; padding: 22px; }
.pp-modal { background: #FDFAF5; border: 1px solid #EFE4D4; border-radius: 22px;
  padding: 32px 30px; width: min(460px, 96vw); text-align: center;
  box-shadow: 0 24px 64px rgba(42,33,26,0.26); }
.pp-modal h2 { font-family: 'Lora', serif; font-size: 25px; font-weight: 600; margin: 0 0 10px; }
.pp-modal p { font-size: 18px; line-height: 1.55; color: #5C4F42; margin: 0 0 10px; }
.pp-modal-check { width: 64px; height: 64px; border-radius: 50%; background: #E8F0E4; color: #4A7A4E;
  font-size: 32px; font-weight: 800; display: flex; align-items: center; justify-content: center;
  margin: 0 auto 18px; }
.pp-addcal-label { font-size: 12.5px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: #8A7A6A; margin: 20px 0 10px; }
.pp-addcal { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 18px; }
.pp-addcal a, .pp-addcal button { font-family: 'Karla', sans-serif; font-size: 15px; font-weight: 700;
  color: #2A211A; background: #FDFAF5; border: 1.5px solid #D9CBB8; border-radius: 999px;
  padding: 11px 20px; cursor: pointer; text-decoration: none; }
.pp-addcal a:hover, .pp-addcal button:hover { border-color: #B4552F; color: #B4552F; }

/* Choosing a different provider — a real target rather than a small link,
   since the people using this are often on a tablet and not steady-handed. */
.pp-alt-btn { background: #FDFAF5; border: 1.5px solid #E4D6C2; border-radius: 999px;
  padding: 12px 22px; font-size: 17px; font-weight: 700; color: #9C4626; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease; }
.pp-alt-btn:hover { border-color: #B4552F; background: #FFF; }
.pp-alt-btn:focus-visible { outline: 2px solid #B4552F; outline-offset: 2px; }
.pp-appt-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 18px; padding-top: 16px; border-top: 1px solid #F2EDE3; }

/* Reschedule picker: stack the calendar above the times on narrow screens */
@media (max-width: 760px) {
  .pp-appt-picker { grid-template-columns: 1fr !important; }
  .pp-appt-picker > div:last-child { border-left: none !important; padding-left: 0 !important;
    border-top: 1px solid #EFE4D4; padding-top: 16px; }
}
