/* Portal Styles - Matching Original Patient Portal */

/* ============================================================
   PATIENT PORTAL THEME TOKENS
   ------------------------------------------------------------
   Structural tokens resolve to the shared --ohc-* set
   (../../styles/common.css), which flips under [data-theme="dark"].
   Brand tokens (orange / blue) and the navy chrome are patient-specific.
   PLACEHOLDER palette — tune the dark values here in one place.
   ============================================================ */
:root {
    /* Brand + chrome */
    --pp-frame:        #2f3d4e;   /* navy header / footer / baseboard   */
    --pp-frame-2:      #2f3d4f;
    --pp-frame-text:   #d2d4d5;
    --pp-page:         #c2d4f0;   /* content area behind the cards      */
    --pp-accent:       #ff8c00;   /* orange brand                       */
    --pp-accent-hover: #fba02f;
    --pp-accent-dark:  #e07b00;
    --pp-blue:         #4a90e2;
    --pp-blue-dark:    #6298c7;

    /* Structural — flip in dark via the shared tokens */
    --pp-surface:     var(--ohc-surface);
    --pp-surface-2:   var(--ohc-surface-2);
    --pp-surface-3:   var(--ohc-surface-3);
    --pp-border:      var(--ohc-border);
    --pp-text:        var(--ohc-text);
    --pp-text-muted:  var(--ohc-text-muted);
    --pp-text-faint:  var(--ohc-text-faint);
    --pp-heading:     #323f4d;    /* navy headings                      */
    --pp-input-bg:    #f6f4f0;    /* cream input fill                   */
    --pp-overlay:     var(--ohc-overlay);
    --pp-warm:        #fff7f0;    /* warm (orange) tint panel           */
    --pp-cool:        #f0f7ff;    /* cool (blue) tint panel             */
}

:root[data-theme="dark"] {
    --pp-page:      #0f1620;
    --pp-heading:   var(--ohc-text);
    --pp-input-bg:  #131b26;
    --pp-warm:      #2a1f12;
    --pp-cool:      #16273f;
    /* Navy chrome already reads as dark; keep it. */
}

/* Chrome autofill forces its own light background via -webkit-autofill, which
   ignores our tokens and shows a white box on dark. Paint over it with an inset
   shadow of the surface colour and keep the text legible. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
select:-webkit-autofill {
    -webkit-text-fill-color: var(--pp-text);
    -webkit-box-shadow: 0 0 0 1000px var(--pp-surface) inset;
    caret-color: var(--pp-text);
    transition: background-color 5000s ease-in-out 0s;
}

body {
    background: var(--pp-frame);
    margin: 0;
    padding: 0;
}

body, input {
    color: var(--pp-text);
    font-family: 'Red Hat Display', sans-serif;
    font-size: 16px;
}

input {
    background: var(--pp-input-bg);
}

h1, h2, h3, h4 {
    margin-bottom: 40px;
    font-family: 'Red Hat Display', sans-serif;
    color: var(--pp-heading);
}

h1 {
    font-size: 40px;
}

h2 {
    font-size: 30px;
}

/* Logo and Banner */
.ohc-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 50px solid var(--pp-frame-2);
}

.ohc-banner a {
    text-decoration: none;
}

.ohc-banner img {
    width: 150px;
    cursor: pointer;
}

/* Navigation Controls - Compact Layout */
.nav-controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-patient-name {
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.nav-flag {
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    user-select: none;
}

.nav-flag:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-flag:active {
    transform: scale(0.95);
}

/* Burger Button */
.burger-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.burger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    /* Sits on the always-navy header, so keep the bars light in both themes. */
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s;
}

.burger-btn:hover span {
    background: var(--pp-blue);
}

/* Responsive */
@media (max-width: 480px) {
    .nav-controls {
        gap: 12px;
    }

    .nav-patient-name {
        font-size: 13px;
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-flag {
        font-size: 20px;
    }
}

/* Loading Overlay */
.overlay {
    opacity: 0;
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: 0.25s;
    pointer-events: none;
    z-index: -1;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.overlay.shown {
    opacity: 1;
    z-index: 5000;
    pointer-events: all;
}

.overlay .hexagon {
    fill: none;
    stroke-width: 0.075;
    transition: fill 0.5s ease;
    vertical-align: center;
}

.overlay .background {
    stroke: papayawhip;
}

.overlay .trace {
    stroke: #f5880d;
    stroke-dasharray: 1 2;
    stroke-dashoffset: 2;
    stroke-linecap: round;
    animation: spin 1s ease-in-out infinite;

}

@keyframes spin {
    100% {
        stroke-dashoffset: -1;
    }
}

/* Base Container */
.ohc-baseboard {
    background: var(--pp-frame);
    min-height: 100vh;
}

/* Inner Container */
.ohc-inner {
    background: var(--pp-page);
    padding: 15px 10px;
}

@media (min-width: 1280px) {
    .ohc-inner, .ohc-banner {
        padding: 15px 100px; /* keep the top padding */
    }
}

@media (min-width: 1800px) {
    .ohc-inner, .ohc-banner {
        padding: 15px 200px; /* keep the top padding */
    }
}

/* nudge up */
.nudge-up{
    margin-top:-85px;
}

/* Footer */
.login-footer {
    text-align: center;
    color: var(--pp-text-faint);
    padding: 30px 0 100px 0;
}

.portal-footer {
    background: var(--pp-frame-2); /* match background */
    color: var(--pp-frame-text);
    padding: 30px 15px 100px;
    font-weight: 200;
    text-align: center;
}

/* Links */
p a {
    color: var(--pp-heading);
    font-weight: 600;
    text-decoration: none;
}

p a:hover {
    color: var(--pp-accent);
}

/* Utility Classes */
.as-link {
    color: var(--pp-accent);
    cursor: pointer;
    text-decoration: underline;
}

.as-link:hover {
    color: var(--pp-accent-hover);
}

/* Booking Styles */
.ohc-in-page-terms {
    background: var(--pp-surface-2);
    padding: 1px 15px;
    font-size: smaller;
    border-radius: 10px;
    color: var(--pp-text-muted);
    margin: 0 0 10px 0;
}

.ohc-in-page-terms h3 {
    margin-bottom: 0;
    color: var(--pp-text-muted);
}

.ohc-content-panel {
    background: rgb(250, 250, 250);
    margin: 15px;
    padding: 15px;
    border-radius: 10px;
}

/* Availability Calendar */
#availabilityCalendar {
    display: flex;
    flex-direction: column; /* default: stacked for mobile */
}

#availabilityCalendar .availability-day {
    width: 100%;
    margin: 20px 0;
    padding: 15px;
    background: var(--pp-surface-2);
    border-radius: 10px;
}
.availability-day h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: var(--pp-heading);
}


/* Bigger than mobile */
@media (min-width: 768px) {
    #availabilityCalendar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 16px; /* spacing between items */
    }

    #availabilityCalendar .availability-day {
        flex: 0 0 calc(50% - 8px);
        /* 50% width minus half the gap to keep alignment clean */
    }
}
/* large screens */
@media (min-width: 1536px) {
    #availabilityCalendar .availability-day {
        flex: 0 0 calc(33% - 8px);
    }
}


.slots-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Time Slots */
.ohc-slot {
    display: inline-block;
    margin: 4px;
    background: var(--pp-surface-2);
    color: var(--pp-text-faint);
    padding: 8px 12px;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.15);
    cursor: not-allowed;
    border-radius: 3px;
    min-width: 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ohc-slot.free {
    color: initial;
    background: var(--pp-surface);
    cursor: pointer;
    transition: all 0.2s;
}

.ohc-slot.free:hover {
    background: var(--pp-surface-2);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ohc-slot.chosen {
    border-radius: 3px;
    background: rgba(255, 140, 0, 0.87);
    color: white;
    font-weight: 400;
}

/* X mark for booked slots */
.ohc-slot:not(.free):before,
.ohc-slot:not(.free):after {
    position: absolute;
    content: '';
    background: rgb(255, 154, 55);
    opacity: 0.3;
    display: block;
    width: 100%;
    height: 6px;
    transform: rotate(-45deg);
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
}

.ohc-slot:not(.free):after {
    transform: rotate(45deg);
}

hr {
    border: 1px solid rgb(255, 140, 0);
    width: 100%;
    margin: 30px 0 30px;
}

/* Symptom Tracker Styles */
.headline-questions {
    margin: 20px 0;
}

.question-row {
    margin: 20px 0;
    align-items: center;
}

.button-group {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
}

.button-group-inline {
    display: inline-flex;
    gap: 0;
    flex-wrap: nowrap;
}

@media (max-width: 599px) {
    .button-group-inline {
        flex-wrap: wrap;
    }
}

.btn-gcs {
    margin: 0;
    border-radius: 0;
    background: var(--pp-surface-2);
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 14px;
    transition: all 0.2s;
    min-width: 80px;
}

.btn-gcs:first-of-type {
    border-radius: 10px 0 0 10px;
}

.btn-gcs:last-of-type {
    border-radius: 0 10px 10px 0;
}

.btn-gcs.selected {
    background: #c8e5ff;
    box-shadow: 0 2px 0 var(--pp-blue-dark);
}

.btn-gcs:hover:not(.selected) {
    background: var(--pp-surface-3);
}

.question {
    margin: 15px 0;
}

.question h4 {
    margin: 10px 5px 5px 5px;
    font-size: 16px;
}

.question hr {
    margin: 10px 5px 5px 5px;
}

.results-breakdown {
    margin: 20px 0;
}

.category-result {
    padding: 10px;
    margin: 5px 0;
    background: var(--pp-surface-2);
    border-radius: 5px;
}

@media (max-width: 599px) {
    .btn-gcs {
        min-width: 24%;
        font-size: 12px;
        padding: 6px 8px;
    }
}

/* Mounjaro Questionnaire Styles */
.mounjaro-intro {
    margin: 20px 0;
}

.checkbox-list {
    margin: 20px 0;
}

.checkbox-item {
    display: block;
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 5px;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: var(--pp-surface-2);
}

.checkbox-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-item.consent-item {
    background: var(--pp-surface-2);
    border-left: 3px solid var(--pp-accent);
}

.medication-row {
    margin: 10px 0;
    gap: 10px;
}

.button-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 400px;
}

.btn-gcs-full {
    width: 100%;
    padding: 12px;
    background: var(--pp-surface-2);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Red Hat Display', sans-serif;
    transition: all 0.2s;
    text-align: left;
}

.btn-gcs-full.selected {
    background: #c8e5ff;
    box-shadow: 0 2px 0 var(--pp-blue-dark);
}

.btn-gcs-full:hover:not(.selected) {
    background: var(--pp-surface-3);
}

.review-section {
    margin: 20px 0;
    padding: 15px;
    background: var(--pp-surface-2);
    border-radius: 5px;
    border-left: 3px solid var(--pp-accent);
}

.review-section h4 {
    margin-top: 0;
    color: var(--pp-accent);
}

.review-section ul {
    margin: 10px 0;
    padding-left: 20px;
}

.bmi-indicator {
    padding: 15px;
    background: #e8f4f8;
    border-radius: 5px;
    border-left: 3px solid var(--pp-blue);
}

.bmi-indicator p {
    margin: 0;
}

/* Unit toggle for height/weight inputs */
.unit-field {
    display: flex;
    flex-direction: column;
}
.unit-field-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}
.unit-field-label {
    font-size: 13px;
    color: var(--pp-text-muted);
    font-weight: 500;
}
.unit-toggle {
    display: flex;
    gap: 0;
}
.unit-btn {
    padding: 3px 10px;
    font-size: 12px;
    font-family: 'Red Hat Display', sans-serif;
    background: var(--pp-surface-2);
    border: 1px solid var(--pp-border);
    cursor: pointer;
    transition: background 0.15s;
    line-height: 1.4;
}
.unit-btn:first-child {
    border-radius: 4px 0 0 4px;
}
.unit-btn:last-child {
    border-radius: 0 4px 4px 0;
    border-left: none;
}
.unit-btn.active {
    background: #c8e5ff;
    border-color: var(--pp-blue-dark);
    color: #1a4f7a;
    font-weight: 600;
}
.unit-btn:hover:not(.active) {
    background: var(--pp-surface-3);
}
.imperial-pair {
    display: flex;
    gap: 10px;
}
.imperial-pair .input-container {
    flex: 1;
}

/* Textarea specific styles */
.input-container textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    font-family: 'Red Hat Display', sans-serif;
    font-size: 16px;
    border: 1px solid var(--pp-border);
    border-radius: 5px;
    resize: vertical;
    box-sizing: border-box;
}

.input-container textarea:focus {
    outline: none;
    border-color: var(--pp-accent);
}

/* Move label above textarea when it has content or is focused */
.input-container textarea:focus ~ label,
.input-container textarea:not(:empty) ~ label {
    top: -8px;
    left: 8px;
    font-size: 12px;
    color: var(--pp-accent);
    background: var(--pp-surface);
    padding: 0 4px;
}

/* Navigation Component */
.ohc-navigation {
    background: var(--pp-surface);
    border-bottom: 2px solid var(--pp-accent);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.ohc-navigation-anonymous {
    background: var(--pp-surface-2);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0; /* Allow text truncation */
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.nav-logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--pp-accent);
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-logo:hover {
    color: var(--pp-accent-dark);
}

.nav-account-info {
    color: var(--pp-text-muted);
    font-size: 14px;
    white-space: nowrap;
}

.nav-info {
    color: var(--pp-text-faint);
    font-size: 14px;
    font-style: italic;
}

/* Burger Menu Button */
.burger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    flex-shrink: 0;
}

.burger-menu span {
    width: 30px;
    height: 3px;
    background: var(--pp-accent);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-menu:hover span {
    background: var(--pp-accent-dark);
}

/* Burger Menu Overlay */
.burger-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
}

.burger-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Burger Menu Panel */
.burger-panel {
    position: fixed;
    top: 0;
    right: -320px;  /* Start off-screen on RIGHT */
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: var(--pp-surface);
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);  /* Shadow on left side */
    transition: right 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
}

.burger-panel.active {
    right: 0;  /* Slide in from RIGHT */
}

.burger-header {
    padding: 20px;
    border-bottom: 2px solid var(--pp-accent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--pp-frame); /* better palette */
    color: white;
}

.burger-header span {
    font-weight: 700;
    font-size: 18px;
    /* inherits colour */
}

.burger-close {
    background: transparent;
    border: none;
    font-size: 32px;
    color: white; /* buttons are black, so need this */
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.burger-close:hover {
    color: var(--pp-accent-dark);
}

.burger-nav {
    flex: 1;
    overflow-y: auto;
}

.burger-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: var(--pp-text);
    text-decoration: none;
    transition: background 0.2s;
    border-left: 3px solid transparent;
    font-size: 16px;
}

.burger-link:hover {
    background: var(--pp-surface-2);
    border-left-color: var(--pp-accent);
}

.burger-icon {
    font-size: 22px;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}

.burger-footer {
    border-top: 1px solid var(--pp-border);
    padding: 20px;
    background: var(--pp-surface-2);
}

.burger-user-name {
    color: var(--pp-text-muted);
    font-size: 14px;
    margin-bottom: 12px;
    text-align: center;
}

/* Appearance (theme) toggle in the burger footer */
.burger-theme {
    margin-bottom: 16px;
}
.burger-theme-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pp-text-faint);
    margin-bottom: 8px;
}
.burger-theme-btns {
    display: flex;
    gap: 6px;
}
.burger-theme-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    background: var(--pp-surface);
    border: 1px solid var(--pp-border);
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Red Hat Display', sans-serif;
    color: var(--pp-text-muted);
    transition: all 0.15s;
}
.burger-theme-btn:hover {
    border-color: var(--pp-accent);
}
.burger-theme-btn.active {
    border-color: var(--pp-accent);
    color: var(--pp-text);
    background: var(--pp-surface-2);
}
.burger-theme-icon { font-size: 18px; line-height: 1; }
.burger-theme-name { font-size: 11px; }

.burger-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--pp-text-muted);
    font-size: 15px;
}

/* Language Picker Overlay */
.lang-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1999;
}

.lang-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Language Picker Panel */
.lang-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    width: 90%;
    max-width: 320px;
    background: var(--pp-surface);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 2000;
}

.lang-panel.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.lang-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--pp-border);
}

.lang-header span {
    font-weight: 600;
    font-size: 16px;
    color: var(--pp-text);
}

.lang-close {
    background: transparent;
    border: none;
    font-size: 28px;
    color: var(--pp-text-faint);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lang-close:hover {
    color: var(--pp-text);
}

.lang-options {
    padding: 10px;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    padding: 15px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    text-align: left;
}

.lang-option:hover {
    background: var(--pp-surface-2);
}

.lang-option.active {
    background: #e8f4fd;
}

.lang-flag {
    font-size: 28px;
}

.lang-name {
    flex: 1;
    font-size: 16px;
    color: var(--pp-text);
    font-weight: 500;
}

.lang-check {
    font-size: 20px;
    color: var(--pp-blue);
    font-weight: bold;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
}

.lang-selector {
    padding: 6px 8px;
    border: 1px solid var(--pp-border);
    border-radius: 5px;
    background: var(--pp-surface);
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.lang-selector:hover {
    border-color: var(--pp-accent);
}

.lang-selector:focus {
    outline: none;
    border-color: var(--pp-accent);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-account-info {
        display: none;
    }

    .nav-logo {
        font-size: 15px;
    }

    .btn-small {
        padding: 5px 8px;
        font-size: 12px;
    }

    .lang-selector {
        padding: 5px 6px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ohc-navigation {
        padding: 12px 15px;
    }

    .nav-left {
        gap: 10px;
    }

    .nav-right {
        gap: 8px;
    }

    .nav-logo {
        font-size: 14px;
        max-width: 140px;
    }

    .nav-info {
        display: none;
    }

    .burger-panel {
        width: 260px;
    }

    .burger-link {
        padding: 14px 16px;
        font-size: 15px;
    }

    .burger-icon {
        font-size: 20px;
        width: 24px;
    }
}

/* Dashboard Styles */
.welcome-message {
    font-size: 20px;
    font-weight: 600;
    color: var(--pp-text);
    margin-bottom: 20px;
}

.dashboard-widget {
    background: var(--pp-surface-2);
    border-left: 3px solid var(--pp-accent);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.dashboard-widget h3 {
    margin-top: 0;
    color: var(--pp-accent);
    font-size: 18px;
    margin-bottom: 15px;
}

.appointment-widget {
    background: #fff7f0;
}

.appointment-details p {
    margin: 5px 0;
}

.profile-widget {
    background: #f0f7ff;
    border-left-color: var(--pp-blue);
}

.profile-widget h3 {
    color: var(--pp-blue);
}

.profile-progress {
    margin: 15px 0;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--pp-blue), #6bb6ff);
    transition: width 0.3s ease;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--pp-surface);
    border: 2px solid var(--pp-border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--pp-text);
    transition: all 0.2s;
    min-height: 100px;
}

.quick-action-card:hover {
    border-color: var(--pp-accent); /* simple, clean */
}

.quick-action-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.quick-action-label {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.activity-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}

.activity-list li {
    padding: 12px;
    background: var(--pp-surface);
    border-left: 3px solid var(--pp-border);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.activity-text {
    flex: 1;
    font-size: 14px;
}

.activity-date {
    font-size: 12px;
    color: var(--pp-text-faint);
    flex-shrink: 0;
}

/* Guest Dashboard */
.guest-welcome {
    max-width: 600px;
    margin: 0 auto;
}

.benefits-box {
    background: #f0f7ff;
    border: 2px solid var(--pp-blue);
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.benefits-box h3 {
    color: var(--pp-blue);
    margin-top: 0;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.benefits-list li {
    padding: 8px 0;
    font-size: 15px;
}

.guest-actions {
    text-align: center;
    padding: 20px;
    background: #fff7f0;
    border-radius: 8px;
}

.guest-actions h3 {
    color: var(--pp-accent);
    margin-top: 0;
}

@media (max-width: 768px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }

    .activity-list li {
        flex-direction: column;
        align-items: flex-start;
    }

    .activity-date {
        margin-top: 5px;
    }
}

/* Bookings Page Styles */
.bookings-list {
    margin: 20px 0;
}

.booking-card {
    background: var(--pp-surface-2);
    border-left: 3px solid var(--pp-blue);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}

.booking-card h3 {
    margin-top: 0;
    color: var(--pp-text);
    font-size: 18px;
    margin-bottom: 15px;
}

.booking-details {
    margin: 15px 0;
}

.booking-details p {
    margin: 8px 0;
    font-size: 15px;
}

.booking-details strong {
    color: var(--pp-text-muted);
}

.booking-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--pp-border);
}

.booking-note small {
    color: var(--pp-text-muted);
    font-size: 13px;
}

.booking-clinician {
    color: var(--pp-blue);
}

.booking-datetime {
    color: var(--pp-text);
}

.booking-duration {
    color: var(--pp-text-muted);
}

@media (max-width: 768px) {
    .booking-card {
        padding: 15px;
    }

    .booking-card h3 {
        font-size: 16px;
    }

    .booking-details p {
        font-size: 14px;
    }
}
/* Prices Table */
.prices-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.prices-table thead {
    background: var(--pp-surface-2);
}

.prices-table th,
.prices-table td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--pp-border);
}

.prices-table th {
    font-weight: 600;
    color: var(--pp-text);
}

.prices-table tbody tr:hover {
    background: var(--pp-surface-2);
}

.table-responsive {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .prices-table th,
    .prices-table td {
        padding: 8px 10px;
        font-size: 14px;
    }
}

/* Medical Questionnaire Form */
.form-section {
    margin: 30px 0;
}

.form-section h3 {
    margin-bottom: 20px;
    color: var(--pp-text);
}

.form-section h5 {
    margin: 15px 0 10px 0;
    color: var(--pp-text-muted);
    font-weight: 500;
    font-size:1em;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-field {
    flex: 1;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--pp-text);
}

.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="number"],
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--pp-border);
    border-radius: 4px;
    font-size: 14px;
}

.form-field textarea {
    resize: vertical;
    font-family: inherit;
}

.form-question {
    margin: 20px 0;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-group input[type="radio"] {
    cursor: pointer;
}

.form-actions {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--pp-border);
    text-align: right;
}

.conditional {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 3px solid var(--pp-blue);
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .radio-group {
        flex-direction: column;
        gap: 10px;
    }
}

/* ============================================================
   Shared helpers used by multiple pages
   ============================================================ */

.ohc-notice {
    border-left: 4px solid var(--pp-blue);
    background: #eaf3fc;
    padding: 12px 16px;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 12px;
    color: #2c4a6e;
}
.ohc-notice--warn {
    border-color: #e67e22;
    background: #fef6ec;
    color: #7a4500;
}
.ohc-error {
    color: #c0392b;
    font-size: 13px;
    margin-top: 8px;
}
.ohc-hint {
    font-size: 13px;
    color: var(--pp-text-faint);
    margin: 2px 0 10px;
}
.ohc-input {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--pp-border);
    border-radius: 4px;
    font-size: 14px;
    background: var(--pp-surface);
    color: var(--pp-text);
    box-sizing: border-box;
    font-family: inherit;
}
.ohc-input:focus { outline: none; border-color: var(--pp-blue); }
.ohc-form-group { margin-bottom: 16px; }
.ohc-form-group label { display: block; font-size: 13px; color: var(--pp-text-muted); margin-bottom: 4px; }

/* ============================================================
   Repeat prescription page (rx-*)
   ============================================================ */

.rx-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.rx-item {
    border: 1px solid var(--pp-border);
    border-radius: 6px;
    overflow: hidden;
}

.rx-item__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: var(--pp-surface-2);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
}
.rx-item__header input[type="checkbox"] { width: 17px; height: 17px; cursor: pointer; flex-shrink: 0; }
.rx-item__dose-hint { font-size: 13px; color: var(--pp-text-faint); font-weight: 400; margin-left: 4px; }

.rx-item__fields {
    padding: 14px 16px;
    background: var(--pp-surface);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    border-top: 1px solid var(--pp-border);
}
.rx-field-group label { display: block; font-size: 12px; color: var(--pp-text-muted); margin-bottom: 4px; }

/* Success state */
.rx-success {
    text-align: center;
    padding: 40px 20px;
}
.rx-success__icon {
    font-size: 48px;
    color: #27ae60;
    line-height: 1;
    margin-bottom: 16px;
}

@media (max-width: 600px) {
    .rx-item__fields { grid-template-columns: 1fr; }
}

/* ---- Invoices page ---- */
.ohc-inv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 16px;
}
.ohc-inv-table thead th {
    text-align: left;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pp-text-faint);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--pp-border);
}
.ohc-inv-td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--pp-border);
    vertical-align: middle;
}
.ohc-inv-table tbody tr:last-child .ohc-inv-td { border-bottom: none; }
.ohc-inv-td--desc { max-width: 260px; }
.ohc-inv-td--action { text-align: right; white-space: nowrap; }

.ohc-inv-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.ohc-inv-badge--unpaid { background: #fef9c3; color: #a16207; }
.ohc-inv-badge--paid   { background: #dcfce7; color: #15803d; }
.ohc-inv-badge--voided { background: #f3f4f6; color: #6b7280; }

.ohc-inv-pay-btn { font-size: 13px; padding: 6px 14px; }

@media (max-width: 600px) {
    .ohc-inv-table thead { display: none; }
    .ohc-inv-table tbody tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--pp-border); }
    .ohc-inv-td { display: block; border: none; padding: 4px 0; }
    .ohc-inv-td--action { text-align: left; }
}

/* ---- Medications page ---- */
.med-card {
    background: var(--pp-surface-2);
    border-left: 3px solid #319795;
    padding: 16px 20px;
    margin-bottom: 16px;
    border-radius: 5px;
}
.med-name {
    font-size: 17px;
    font-weight: 600;
    color: var(--pp-text);
    margin-bottom: 8px;
}
.med-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    font-size: 14px;
    color: var(--pp-text-muted);
}
.muted-text {
    color: var(--pp-text-faint);
    font-style: italic;
}

/* ---- Stripe payment return page ---- */
.ohc-return-card {
    text-align: center;
    padding: 48px 32px;
    max-width: 480px;
    margin: 0 auto;
}
.ohc-return-card h2 {
    margin-bottom: 12px;
}
.ohc-return-btn {
    margin-top: 24px;
    display: inline-block;
}

/* ============================================================
   DARK-MODE OVERRIDES  (patient portal)
   ------------------------------------------------------------
   The chrome, cards, text and borders flip via the --pp-*/--ohc-*
   tokens. These rules re-tint the pastel widgets, badges and
   selected states that carry their own light fills. PLACEHOLDER
   tints — tune alongside the token block at the top of this file.
   ============================================================ */
:root[data-theme="dark"] {
    --pp-tint-blue-bg:   #16273f;  --pp-tint-blue-fg:   #6ca8f0;
    --pp-tint-warm-bg:   #2a1f12;
    --pp-tint-green-bg:  #17331f;  --pp-tint-green-fg:  #5fbf7f;
    --pp-tint-amber-bg:  #33280a;  --pp-tint-amber-fg:  #e0b04a;
    --pp-tint-grey-bg:   #232f40;  --pp-tint-grey-fg:   #93a4b8;
    --pp-select-bg:      #1f3350;  --pp-select-fg:      #cfe4ff;
}

/* Segmented / unit toggles — selected state */
:root[data-theme="dark"] .btn-gcs.selected,
:root[data-theme="dark"] .btn-gcs-full.selected { background: var(--pp-select-bg); box-shadow: 0 2px 0 var(--pp-blue); }
:root[data-theme="dark"] .unit-btn.active        { background: var(--pp-select-bg); border-color: var(--pp-blue); color: var(--pp-select-fg); }

/* Dashboard / guest widgets */
:root[data-theme="dark"] .appointment-widget { background: var(--pp-tint-warm-bg); }
:root[data-theme="dark"] .guest-actions      { background: var(--pp-tint-warm-bg); }
:root[data-theme="dark"] .profile-widget,
:root[data-theme="dark"] .benefits-box       { background: var(--pp-tint-blue-bg); }
:root[data-theme="dark"] .bmi-indicator      { background: var(--pp-tint-blue-bg); }

/* Notices */
:root[data-theme="dark"] .ohc-notice        { background: var(--pp-tint-blue-bg);  color: var(--pp-tint-blue-fg); }
:root[data-theme="dark"] .ohc-notice--warn  { background: var(--pp-tint-amber-bg); color: var(--pp-tint-amber-fg); }

/* Language picker active row */
:root[data-theme="dark"] .lang-option.active { background: var(--ohc-accent-soft); }

/* Invoice status badges */
:root[data-theme="dark"] .ohc-inv-badge--unpaid { background: var(--pp-tint-amber-bg); color: var(--pp-tint-amber-fg); }
:root[data-theme="dark"] .ohc-inv-badge--paid   { background: var(--pp-tint-green-bg); color: var(--pp-tint-green-fg); }
:root[data-theme="dark"] .ohc-inv-badge--voided { background: var(--pp-tint-grey-bg);  color: var(--pp-tint-grey-fg); }

/* Time slots (booking) */
:root[data-theme="dark"] .ohc-slot          { background: var(--pp-surface-3); color: var(--pp-text-faint); }
:root[data-theme="dark"] .ohc-slot.free     { background: var(--pp-surface); color: var(--pp-text); }
:root[data-theme="dark"] .ohc-slot.free:hover { background: var(--pp-surface-2); }
/* A chosen slot keeps its .free class, so .free:hover would otherwise clobber
   this. The selected state must always read as orange — force it. */
:root[data-theme="dark"] .ohc-slot.chosen   { background: rgba(255, 140, 0, 0.9) !important; color: #fff !important; }

/* Content panel + terms */
:root[data-theme="dark"] .ohc-content-panel { background: var(--pp-surface-2); }

/* Secondary button reads navy-on-white in light; invert for dark */
:root[data-theme="dark"] .btn-secondary.btn-raised { background: var(--pp-surface); color: var(--pp-text); border-color: var(--pp-border); }
:root[data-theme="dark"] .btn-secondary.btn-raised:not(:disabled):hover { background: var(--pp-surface-3); }
