/**
 * Medora SOAP Note Styling
 * Enterprise Healthcare AI - Consistent Medical Documentation Typography
 *
 * Font System: Inter (primary) with system fallbacks
 * - Optimized for medical readability
 * - Consistent across all SOAP sections
 */

/* ============================================
   MEDICAL TYPOGRAPHY VARIABLES
   ============================================ */
:root {
    /* Primary Medical Font Stack - Inter for clean, professional look */
    --medora-font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    /* Font Sizes - Consistent scale */
    --medora-font-size-xs: 11px;
    --medora-font-size-sm: 12px;
    --medora-font-size-base: 14px;
    --medora-font-size-md: 15px;
    --medora-font-size-lg: 16px;
    --medora-font-size-xl: 18px;

    /* Font Weights */
    --medora-font-normal: 400;
    --medora-font-medium: 500;
    --medora-font-semibold: 600;
    --medora-font-bold: 700;

    /* Line Heights */
    --medora-line-height-tight: 1.4;
    --medora-line-height-normal: 1.6;
    --medora-line-height-relaxed: 1.75;

    /* Colors - Medical-grade neutrals */
    --medora-text-primary: #1f2937;
    --medora-text-secondary: #374151;
    --medora-text-muted: #6b7280;
    --medora-text-light: #9ca3af;

    /* Section accent colors */
    --medora-color-subjective: #0369a1;
    --medora-color-objective: #059669;
    --medora-color-assessment: #7c3aed;
    --medora-color-plan: #dc2626;
}

/* ============================================
   UNIVERSAL CARD BASE CLASSES
   Shared styling for PLAN, ASSESSMENT, PI cards
   ============================================ */
.soap-card {
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    padding: 8px 14px;
}

.soap-card-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ============================================
   BASE SOAP SECTION STYLING
   All sections use identical typography
   ============================================ */
.soap-subjective,
.soap-objective,
.soap-assessment,
.soap-plan,
.soap-patient-instructions,
.soap-followup {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-base);
    font-weight: var(--medora-font-normal);
    line-height: var(--medora-line-height-normal);
    color: var(--medora-text-secondary);
    margin-bottom: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ============================================
   SECTION HEADERS - Consistent across all
   ============================================ */
.soap-section-header,
.subjective-header,
.subsection-header,
.category-header,
.plan-diagnosis {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-base);
    font-weight: var(--medora-font-semibold);
    color: var(--medora-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

/* ============================================
   SUBJECTIVE SECTION
   ============================================ */
.subjective-subsection {
    margin-bottom: 16px;
}

.subjective-content,
.subsection-content {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-base);
    color: var(--medora-text-secondary);
    line-height: var(--medora-line-height-normal);
    padding-left: 12px;
}

/* Subsection header accent colors - subtle medical theme */
.chief-complaint .subsection-header { color: #059669; }
.hpi .subsection-header { color: var(--medora-color-subjective); }
.ros .subsection-header { color: var(--medora-color-assessment); }
.pmh .subsection-header { color: var(--medora-color-plan); }
.social .subsection-header { color: #ea580c; }
.allergies .subsection-header { color: #c2410c; }
.family-history .subsection-header { color: #0891b2; }

/* Review of Systems styling */
.ros-system {
    margin-bottom: 8px;
}

.ros-system strong {
    font-family: var(--medora-font-primary);
    color: var(--medora-text-muted);
    font-weight: var(--medora-font-semibold);
}

/* ============================================
   OBJECTIVE SECTION
   ============================================ */
.objective-content {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-base);
    color: var(--medora-text-secondary);
    line-height: var(--medora-line-height-normal);
}

/* ============================================
   ASSESSMENT SECTION
   ============================================ */
.assessment-item {
    display: flex;
    margin-bottom: 10px;
    align-items: flex-start;
}

.assessment-number {
    font-family: var(--medora-font-primary);
    font-weight: var(--medora-font-semibold);
    color: var(--medora-text-muted);
    margin-right: 8px;
    min-width: 24px;
}

.assessment-text {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-base);
    color: var(--medora-text-secondary);
    flex: 1;
    line-height: var(--medora-line-height-normal);
}

/* ICD-10 code styling */
.assessment-text .icd-code {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-sm);
    color: var(--medora-text-muted);
    font-weight: var(--medora-font-medium);
}

/* ============================================
   PLAN SECTION - Modern Card-Based Layout
   Clean, minimal design with:
   - Soft card backgrounds
   - Medora blue accent border
   - Tight spacing for readability
   ============================================ */

/* Container: Flexbox column with gap between cards */
.plan-container {
    font-family: var(--medora-font-primary);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Diagnosis Card: Each diagnosis is a distinct card */
.plan-diagnosis-card {
    border-radius: 10px;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Alternating card shading for clinician readability (Dec 8, 2025) */
.plan-diagnosis-card:nth-child(odd) {
    background: #f9fafb;
}

.plan-diagnosis-card:nth-child(even) {
    background: #fefefe;
}

/* Level 1: Diagnosis Header */
.plan-diagnosis {
    font-family: var(--medora-font-primary);
    font-size: 1.0rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
}

/* Level 2: Category Header */
.plan-category {
    font-family: var(--medora-font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    margin-top: 4px;
    margin-bottom: 2px;
}

/* Level 3: Item List */
.plan-items {
    list-style-type: disc;
    padding-left: 22px;
    margin: 0;
    margin-bottom: 4px;
}

/* Level 3: Individual Item */
.plan-items .plan-item {
    font-family: var(--medora-font-primary);
    font-size: 0.9rem;
    color: var(--medora-text-secondary);
    line-height: 1.35rem;
    margin-bottom: 2px;
}

/* Legacy support: old .plan-diagnosis-block class (backwards compat) */
.plan-diagnosis-block {
    background: #ffffff;
    border-radius: 8px;
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    margin-bottom: 12px;
}

.plan-diagnosis-block.first {
    margin-top: 0;
}

/* Legacy support for non-list plan items */
.plan-item:not(li) {
    display: flex;
    margin-bottom: 2px;
    align-items: flex-start;
    padding-left: 24px;
}

.plan-bullet {
    font-family: var(--medora-font-primary);
    color: var(--medora-text-muted);
    margin-right: 6px;
    min-width: 10px;
}

.plan-text {
    font-family: var(--medora-font-primary);
    font-size: 0.9rem;
    color: var(--medora-text-secondary);
    flex: 1;
    line-height: 1.3rem;
}

.plan-text-line {
    font-family: var(--medora-font-primary);
    font-size: 0.9rem;
    color: var(--medora-text-secondary);
    padding-left: 24px;
    line-height: 1.3rem;
    margin-bottom: 2px;
}

/* ============================================
   PATIENT INSTRUCTIONS
   ============================================ */
.instruction-category {
    margin-bottom: 16px;
}

.category-header {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-base);
    font-weight: var(--medora-font-semibold);
    color: var(--medora-text-primary);
    margin-bottom: 8px;
}

.instruction-item {
    display: flex;
    margin-bottom: 6px;
    align-items: flex-start;
}

.instruction-bullet {
    font-family: var(--medora-font-primary);
    color: var(--medora-text-muted);
    margin-right: 8px;
    min-width: 12px;
}

.instruction-text {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-base);
    color: var(--medora-text-secondary);
    flex: 1;
    line-height: var(--medora-line-height-normal);
}

/* ============================================
   FOLLOW-UP SECTION
   ============================================ */
.followup-item {
    display: flex;
    margin-bottom: 8px;
    align-items: flex-start;
}

.followup-bullet {
    font-family: var(--medora-font-primary);
    color: var(--medora-text-muted);
    margin-right: 8px;
    min-width: 12px;
}

.followup-text {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-base);
    color: var(--medora-text-secondary);
    flex: 1;
    line-height: var(--medora-line-height-normal);
}

/* ============================================
   HPI SPECIFIC - Better readability
   ============================================ */
.hpi .subsection-content {
    line-height: var(--medora-line-height-relaxed);
}

/* ============================================
   TEXT UTILITIES
   ============================================ */
.soap-subjective .subsection-content,
.soap-objective .objective-content,
.assessment-text,
.plan-text,
.instruction-text,
.followup-text {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .soap-subjective,
    .soap-objective,
    .soap-assessment,
    .soap-plan,
    .soap-patient-instructions,
    .soap-followup {
        font-size: var(--medora-font-size-sm);
    }

    .soap-subsection {
        padding-left: 8px;
    }

    .subsection-header,
    .category-header,
    .plan-diagnosis {
        font-size: var(--medora-font-size-sm);
    }

    /* PLAN 3-level hierarchy mobile adjustments */
    .plan-diagnosis-card,
    .plan-diagnosis-block {
        padding: 8px 12px;
    }

    .plan-diagnosis {
        font-size: 0.95rem;
    }

    .plan-items .plan-item {
        font-size: 0.88rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .soap-subjective,
    .soap-objective,
    .soap-assessment,
    .soap-plan,
    .soap-patient-instructions,
    .soap-followup {
        font-family: var(--medora-font-primary);
        font-size: 11px;
        line-height: var(--medora-line-height-tight);
        color: #000;
    }

    .soap-subsection {
        break-inside: avoid;
        margin-bottom: 12px;
    }

    .subsection-header,
    .category-header,
    .plan-diagnosis {
        color: #000 !important;
        font-weight: var(--medora-font-bold);
    }

    .assessment-number,
    .plan-bullet,
    .instruction-bullet,
    .followup-bullet {
        color: #333 !important;
    }

    /* PLAN 3-level hierarchy print adjustments */
    .plan-diagnosis-card,
    .plan-diagnosis-block {
        background: transparent !important;
        border-left: 2px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
        padding: 8px 12px;
        margin-bottom: 12px;
        border-radius: 0 !important;
    }

    .plan-diagnosis {
        font-size: 12px;
        font-weight: bold;
        color: #000 !important;
        border-bottom: 1px solid #000;
    }

    .plan-category {
        font-size: 10px;
        font-weight: 600;
        color: #333 !important;
        border-left-color: #333 !important;
    }

    .plan-items .plan-item {
        font-size: 10px;
        color: #000 !important;
    }
}

/* ============================================
   SOAP NOTE CONTAINER OVERRIDE
   Ensures consistent fonts in all contexts
   ============================================ */
.soap-note-content,
.soap-notes-container,
.clinical-documentation,
[class*="soap-"],
.plan-container {
    font-family: var(--medora-font-primary);
}

/* Force override any inherited fonts */
.soap-subjective *,
.soap-objective *,
.soap-assessment *,
.soap-plan *,
.soap-patient-instructions *,
.soap-followup *,
.plan-container *,
.plan-diagnosis-block *,
.plan-items * {
    font-family: inherit;
}

/* ============================================
   CLINICAL CODES SECTION (ICD-10 Panel)
   Rendered as SOAP-style section (after PLAN, before Patient Instructions)
   Uses identical styling to PLAN cards
   Added: December 8, 2025
   Updated: December 8, 2025 - Match SOAP section styling exactly
   ============================================ */

/* Section container - matches SOAP table row structure */
.clinical-codes-section {
    font-family: var(--medora-font-primary);
    border-bottom: 1px solid #eee;
}

/* Section header row - matches SOAP section headers exactly */
.clinical-codes-header-cell {
    padding: 12px 16px;
    font-weight: 600;
    color: #232f3e;
    width: 200px;
    border-right: 1px solid #ddd;
    vertical-align: top;
    background: transparent;
}

/* Content cell - matches SOAP content cells */
.clinical-codes-content-cell {
    padding: 12px 16px;
    vertical-align: top;
}

/* Card stack container - identical to .plan-container */
.clinical-codes-container {
    font-family: var(--medora-font-primary);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Individual ICD card - uses .plan-diagnosis-card styling */
.icd-code-card {
    border-radius: 10px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

/* Alternating card shading - matches PLAN cards exactly */
.icd-code-card:nth-child(odd) {
    background: #f9fafb;
}

.icd-code-card:nth-child(even) {
    background: #fefefe;
}

/* Card header row with dropdown and menu */
.icd-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 6px;
}

/* Select wrapper for positioning */
.icd-code-select-wrapper {
    flex: 1;
    min-width: 0;
}

/* ICD code dropdown select - Fred-style with code + description */
.icd-code-select {
    font-family: var(--medora-font-primary);
    font-size: 0.9rem;
    font-weight: 500;
    color: #111827;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 8px 36px 8px 12px;
    width: 100%;
    max-width: 400px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M3 4.5L6 7.5L9 4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.icd-code-select:hover {
    border-color: #9ca3af;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.icd-code-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

/* Dropdown option styling */
.icd-code-select option {
    font-family: var(--medora-font-primary);
    font-size: 0.9rem;
    padding: 8px 12px;
    color: #374151;
}

/* ICD description text - secondary style below dropdown */
.icd-description {
    font-family: var(--medora-font-primary);
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
    padding-left: 2px;
    margin-top: 2px;
}

/* Row menu button (⋮) - matches SOAP action buttons */
.icd-row-menu {
    font-size: 1.2rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    border: none;
    background: transparent;
    transition: color 0.15s ease, background-color 0.15s ease;
    user-select: none;
    flex-shrink: 0;
}

.icd-row-menu:hover {
    color: #374151;
    background: #e5e7eb;
}

.icd-row-menu:focus {
    outline: none;
    background: #e5e7eb;
}

/* Add code button - full width Medora style */
.icd-add-code {
    font-family: var(--medora-font-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #374151;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.icd-add-code:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
    color: #111827;
}

.icd-add-code-icon {
    font-size: 1.1rem;
    font-weight: 600;
    color: #6b7280;
}

/* Empty state */
.clinical-codes-empty {
    font-family: var(--medora-font-primary);
    font-size: 0.9rem;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

/* Mobile responsive - matches SOAP sections */
@media (max-width: 768px) {
    .clinical-codes-header-cell {
        display: block;
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 10px 12px;
    }

    .clinical-codes-content-cell {
        display: block;
        padding: 10px 12px;
    }

    .icd-code-card {
        padding: 8px 12px;
    }

    .icd-card-header {
        flex-wrap: wrap;
    }

    .icd-code-select {
        font-size: 0.9rem;
        min-width: 90px;
    }

    .icd-description {
        font-size: 0.85rem;
    }
}

/* Print styles for Clinical Codes */
@media print {
    .clinical-codes-section {
        page-break-inside: avoid;
    }

    .icd-code-card {
        box-shadow: none;
        border: 1px solid #ccc;
        background: #fff !important;
    }

    .icd-code-select {
        border: none;
        background: transparent;
        padding: 0;
        appearance: auto;
        font-weight: 600;
    }

    .icd-row-menu,
    .icd-add-code {
        display: none;
    }
}

/* =============================================================================
   PATIENT INSTRUCTIONS - FREED-STYLE RENDERING
   Updated: December 8, 2025
   Clean, professional After-Visit Summary format
   Light, modern typography matching a real EMR AVS
   ============================================================================= */

.soap-patient-instructions {
    font-family: var(--medora-font-primary);
    font-size: var(--medora-font-size-base);
    line-height: 1.6;
    color: #374151;
}

/* Freed-style container */
.pi-freed-style {
    font-family: var(--medora-font-primary);
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}

/* Greeting: "Dear Patient," */
.pi-greeting {
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    margin: 0 0 8px 0;
}

/* Intro paragraph: "Thank you for visiting..." */
.pi-intro {
    font-size: 14px;
    color: #4b5563;
    margin: 0 0 16px 0;
}

/* Section container */
.pi-section {
    margin-bottom: 14px;
}

/* Section title: "Medications:", "Laboratory Tests:", etc. */
.pi-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

/* Section bullet list */
.pi-section-list {
    margin: 0 0 0 20px;
    padding: 0;
    list-style-type: disc;
}

.pi-section-list li {
    font-size: 14px;
    color: #374151;
    line-height: 1.55;
    margin-bottom: 3px;
}

.pi-section-list li:last-child {
    margin-bottom: 0;
}

/* Closing paragraph: "Please reach out..." */
.pi-closing {
    font-size: 14px;
    color: #4b5563;
    margin: 16px 0 12px 0;
}

/* Signature block */
.pi-signature {
    margin-top: 12px;
}

.pi-signature p {
    font-size: 14px;
    color: #374151;
    margin: 0 0 2px 0;
}

.pi-provider-name {
    font-weight: 600;
    color: #1f2937;
}

.pi-specialty {
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

/* Empty state (legacy) */
.pi-empty {
    font-family: var(--medora-font-primary);
    font-size: 14px;
    color: #9ca3af;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* ==============================================
   PI v3.1 FAIL-CLOSED EMPTY STATE (December 2025)
   Clean, professional message when no verifiable
   instructions exist - matches SOAP section styling
   ============================================== */
.pi-empty-state {
    font-family: var(--medora-font-primary);
    font-size: 14px;
    color: #6b7280;
    font-style: normal;
    padding: 8px 0;
    margin: 0;
    line-height: 1.6;
}

/* ==============================================
   PI v3 STRUCTURED STYLES (December 2025)
   Backend-generated structured JSON rendering
   ============================================== */

.pi-v3-structured {
    font-family: var(--medora-font-primary);
    font-size: 14px;
    line-height: 1.65;
    color: #374151;
}

/* PI v3 Section container */
.pi-v3-section {
    margin-bottom: 14px;
}

/* PI v3 Section title */
.pi-v3-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 4px;
}

/* PI v3 Section bullet list */
.pi-v3-section-list {
    margin: 0 0 0 20px;
    padding: 0;
    list-style-type: disc;
}

.pi-v3-section-list li {
    font-size: 14px;
    color: #374151;
    line-height: 1.55;
    margin-bottom: 3px;
}

.pi-v3-section-list li:last-child {
    margin-bottom: 0;
}

/* PI v3.1: Clean patient-facing styling (Dec 12, 2025)
 * 🎨 LIGHTWEIGHT UI: No visual indicators (📎, hover highlights) for patients
 * Evidence data is preserved in data-evidence attributes for clinician-only features
 * Items are rendered as plain list items - clean, professional appearance
 */

/* PI v3 Signature block */
.pi-v3-signature {
    margin-top: 12px;
}

.pi-v3-signature p {
    font-size: 14px;
    color: #374151;
    margin: 0 0 2px 0;
}

/* ==============================================
   LEGACY PI STYLES (kept for backwards compat)
   ============================================== */

/* Section headers - clean style matching SOAP */
.pi-section-header {
    font-family: var(--medora-font-primary);
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    margin: 16px 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pi-section-header:first-child {
    margin-top: 0;
}

/* Patient Treatment Plan header */
.pi-section-header.pi-main-header {
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #E5E7EB;
}

/* Diagnoses list - clean numbered list */
.pi-diagnoses-list {
    margin: 4px 0 12px 20px;
    padding: 0;
    list-style-type: decimal;
}

.pi-diagnoses-list li {
    font-family: var(--medora-font-primary);
    font-size: 14px;
    color: #374151;
    margin-bottom: 2px;
    line-height: 1.5;
}

/* Personal message - subtle left border */
.pi-personal-message {
    border-left: 3px solid #6366F1;
    padding: 8px 12px;
    margin: 4px 0 12px 0;
    background: #FAFAFA;
}

.pi-personal-message p {
    font-family: var(--medora-font-primary);
    font-size: 14px;
    color: #4B5563;
    margin: 0 0 6px 0;
    line-height: 1.5;
}

.pi-personal-message p:last-child {
    margin-bottom: 0;
}

/* Bullet lists - standard format */
.pi-bullets {
    margin: 4px 0 12px 20px;
    padding: 0;
    list-style-type: disc;
}

.pi-bullets li {
    font-family: var(--medora-font-primary);
    font-size: 14px;
    color: #374151;
    margin-bottom: 3px;
    line-height: 1.5;
}

.pi-bullets li:last-child {
    margin-bottom: 0;
}

/* Metadata section (patient name, date, doctor info) */
.pi-metadata {
    font-family: var(--medora-font-primary);
    color: #6B7280;
    font-size: 13px;
    margin-bottom: 8px;
}

.pi-metadata p {
    margin: 2px 0;
}

/* Print styles for PI */
@media print {
    .pi-freed-style {
        font-size: 11pt;
        line-height: 1.5;
    }

    .pi-greeting,
    .pi-intro,
    .pi-section-title,
    .pi-closing {
        font-size: 11pt;
    }

    .pi-section-list li {
        font-size: 10pt;
    }

    .pi-signature p {
        font-size: 10pt;
    }

    .pi-section-header {
        margin-top: 10px;
        font-size: 11pt;
    }

    .pi-bullets li,
    .pi-diagnoses-list li {
        font-size: 10pt;
    }

    .pi-personal-message {
        background: #f5f5f5;
        border-left-color: #666;
    }
}