/**
 * Pharma Medical Tools - Enhanced Modern Styles
 * Version 2.0 - AI-Powered Medical Tools
 */

:root {
    /* Primary Colors */
    --pmt-primary: #4f46e5;
    --pmt-primary-light: #6366f1;
    --pmt-primary-dark: #4338ca;
    --pmt-primary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    
    /* Secondary Colors */
    --pmt-secondary: #06b6d4;
    --pmt-secondary-light: #22d3ee;
    --pmt-secondary-dark: #0891b2;
    
    /* Accent Colors */
    --pmt-accent: #8b5cf6;
    --pmt-danger: #ef4444;
    --pmt-warning: #f59e0b;
    --pmt-info: #0ea5e9;
    --pmt-success: #10b981;
    
    /* Neutral Colors */
    --pmt-dark: #0f172a;
    --pmt-gray-900: #1e293b;
    --pmt-gray-800: #334155;
    --pmt-gray-700: #475569;
    --pmt-gray-600: #64748b;
    --pmt-gray-500: #94a3b8;
    --pmt-gray-400: #cbd5e1;
    --pmt-gray-300: #e2e8f0;
    --pmt-gray-200: #f1f5f9;
    --pmt-gray-100: #f8fafc;
    --pmt-light: #f8fafc;
    --pmt-white: #ffffff;
    
    /* Legacy mappings */
    --pmt-border: #e2e8f0;
    --pmt-text: #334155;
    --pmt-text-light: #64748b;
    
    /* Design tokens */
    --pmt-radius: 16px;
    --pmt-radius-sm: 8px;
    --pmt-radius-lg: 24px;
    --pmt-radius-xl: 32px;
    
    /* Shadows */
    --pmt-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --pmt-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --pmt-shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --pmt-shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --pmt-shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --pmt-shadow-glow: 0 0 40px rgba(79, 70, 229, 0.15);
    --pmt-shadow-primary: 0 8px 24px -4px rgba(79, 70, 229, 0.35);
    
    /* Transitions */
    --pmt-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --pmt-transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --pmt-transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container */
.pmt-tools-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.pmt-section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--pmt-dark);
    margin-bottom: 0.75rem;
    text-align: center;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--pmt-dark) 0%, var(--pmt-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pmt-section-desc {
    color: var(--pmt-gray-600);
    text-align: center;
    margin-bottom: 3rem;
    font-size: 1.125rem;
    line-height: 1.75;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Tools Grid */
.pmt-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Card Styles */
.pmt-card {
    background: var(--pmt-white);
    border: 1px solid var(--pmt-gray-200);
    border-radius: var(--pmt-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--pmt-transition);
    box-shadow: var(--pmt-shadow-sm);
    position: relative;
    overflow: hidden;
}

.pmt-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--pmt-primary-gradient);
    opacity: 0;
    transition: var(--pmt-transition);
}

.pmt-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--pmt-shadow-lg);
    border-color: var(--pmt-primary-light);
}

.pmt-card:hover::before {
    opacity: 1;
}

.pmt-card-icon {
    font-size: 3.5rem;
    margin-bottom: 1.25rem;
    display: inline-block;
    animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pmt-card h4 {
    font-size: 1.375rem;
    color: var(--pmt-dark);
    margin-bottom: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.pmt-card p {
    color: var(--pmt-gray-600);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Tool Component */
.pmt-tool {
    background: var(--pmt-white);
    border: 1px solid var(--pmt-gray-200);
    border-radius: var(--pmt-radius-lg);
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: var(--pmt-shadow-md);
    transition: var(--pmt-transition);
}

.pmt-tool:hover {
    box-shadow: var(--pmt-shadow-lg), var(--pmt-shadow-glow);
}

.pmt-tool-header {
    background: var(--pmt-primary-gradient);
    color: white;
    padding: 2rem 2rem 1.75rem;
    position: relative;
    overflow: hidden;
}

.pmt-tool-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { opacity: 0.5; transform: translateX(-10%); }
    50% { opacity: 1; transform: translateX(10%); }
}

.pmt-tool-header h3 {
    margin: 0 0 0.75rem 0;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
    color: #ffffff;
}

.pmt-tool-header p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.7);
}

.pmt-tool-body {
    padding: 2rem;
}

/* Form Elements */
.pmt-input-group {
    margin-bottom: 1.25rem;
}

.pmt-input-group label {
    display: block;
    font-weight: 600;
    color: var(--pmt-gray-800);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.pmt-input,
.pmt-select,
.pmt-textarea {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid var(--pmt-gray-200);
    border-radius: var(--pmt-radius-sm);
    font-size: 1rem;
    transition: var(--pmt-transition-fast);
    box-sizing: border-box;
    background: var(--pmt-white);
    color: var(--pmt-gray-800);
    margin-bottom: 1rem;
}

.pmt-input::placeholder,
.pmt-textarea::placeholder {
    color: var(--pmt-gray-400);
}

.pmt-input:hover,
.pmt-select:hover,
.pmt-textarea:hover {
    border-color: var(--pmt-gray-300);
}

.pmt-input:focus,
.pmt-select:focus,
.pmt-textarea:focus {
    outline: none;
    border-color: var(--pmt-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.pmt-input-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.pmt-help-text {
    font-size: 0.8rem;
    color: var(--pmt-gray-500);
    margin-top: 0.375rem;
}

/* Buttons */
.pmt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--pmt-radius-sm);
    cursor: pointer;
    transition: var(--pmt-transition);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pmt-btn-primary {
    background: var(--pmt-primary-gradient);
    color: white;
    box-shadow: var(--pmt-shadow-primary);
}

.pmt-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(79, 70, 229, 0.45);
}

.pmt-btn-primary:active {
    transform: translateY(0);
}

.pmt-btn-ai {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 50%, #d946ef 100%);
    color: white;
    box-shadow: 0 8px 24px -4px rgba(139, 92, 246, 0.4);
    position: relative;
    min-width: 200px;
}

.pmt-btn-ai::before {
    content: '✨';
    margin-right: 0.25rem;
}

.pmt-btn-ai:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -6px rgba(139, 92, 246, 0.5);
}

/* Single AI button - centered */
.pmt-btn-group.pmt-single-btn {
    justify-content: center;
}

.pmt-btn-group.pmt-single-btn .pmt-btn-ai {
    min-width: 280px;
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.pmt-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--pmt-gray-100);
    color: var(--pmt-gray-700);
    border-radius: 100px;
}

.pmt-btn-small:hover {
    background: var(--pmt-gray-200);
    color: var(--pmt-primary);
}

/* Quick Search */
.pmt-quick-search,
.pmt-quick-check {
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--pmt-gray-100) 0%, var(--pmt-gray-50, #fafbfc) 100%);
    border-radius: var(--pmt-radius-sm);
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    align-items: center;
    border: 1px solid var(--pmt-gray-200);
}

.pmt-quick-search span,
.pmt-quick-check span {
    font-weight: 600;
    color: var(--pmt-gray-600);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

/* Results */
.pmt-result {
    margin-top: 2rem;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Alerts */
.pmt-alert {
    padding: 1.125rem 1.5rem;
    border-radius: var(--pmt-radius-sm);
    margin: 1rem 0;
    font-size: 0.95rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.pmt-alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border: 1px solid #fbbf24;
    color: #92400e;
}

.pmt-alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #f87171;
    color: #991b1b;
}

.pmt-alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border: 1px solid #60a5fa;
    color: #1e40af;
}

.pmt-alert-success {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border: 1px solid #4ade80;
    color: #166534;
}

/* Drug Card */
.pmt-drug-card,
.pmt-interaction-card,
.pmt-dict-card {
    background: var(--pmt-white);
    border: 1px solid var(--pmt-gray-200);
    border-radius: var(--pmt-radius);
    overflow: hidden;
    box-shadow: var(--pmt-shadow);
    transition: var(--pmt-transition);
}

.pmt-drug-card:hover,
.pmt-interaction-card:hover {
    box-shadow: var(--pmt-shadow-md);
}

.pmt-drug-card h4,
.pmt-drug-name {
    font-size: 1.625rem;
    color: var(--pmt-primary);
    margin: 0;
    padding: 1.5rem 1.5rem 0.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.pmt-drug-class {
    display: inline-block;
    background: linear-gradient(135deg, var(--pmt-secondary) 0%, var(--pmt-secondary-dark) 100%);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0 1.5rem 1.25rem;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.3);
}

.pmt-drug-details,
.pmt-interaction-details {
    padding: 0 1.5rem 1.5rem;
}

.pmt-detail-row {
    padding: 1rem 0;
    border-bottom: 1px solid var(--pmt-gray-100);
    line-height: 1.6;
    font-size: 0.95rem;
}

.pmt-detail-row:last-child {
    border-bottom: none;
}

.pmt-detail-row strong {
    color: var(--pmt-gray-800);
    font-weight: 600;
}

.pmt-detail-row.pmt-warning {
    background: linear-gradient(90deg, #fef2f2 0%, transparent 100%);
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--pmt-danger);
}

.pmt-detail-row.pmt-caution {
    background: linear-gradient(90deg, #fffbeb 0%, transparent 100%);
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--pmt-warning);
}

.pmt-detail-row.pmt-highlight {
    background: linear-gradient(90deg, #f0fdf4 0%, transparent 100%);
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem;
    border-left: 4px solid var(--pmt-success);
}

/* Interaction Severity */
.pmt-interaction-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    background: var(--pmt-gray-50, #fafbfc);
    border-bottom: 1px solid var(--pmt-gray-200);
}

.pmt-interaction-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--pmt-gray-800);
    font-weight: 600;
}

.pmt-severity-badge {
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pmt-severity-major .pmt-severity-badge,
.pmt-severity-contraindicated .pmt-severity-badge {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.pmt-severity-moderate .pmt-severity-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.pmt-severity-minor .pmt-severity-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

/* Tables */
.pmt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
    border-radius: var(--pmt-radius-sm);
    overflow: hidden;
    box-shadow: var(--pmt-shadow-sm);
}

.pmt-table th,
.pmt-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--pmt-gray-100);
}

.pmt-table th {
    background: linear-gradient(135deg, var(--pmt-gray-100) 0%, var(--pmt-gray-50, #fafbfc) 100%);
    font-weight: 600;
    color: var(--pmt-gray-800);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.05em;
}

.pmt-table tbody tr {
    transition: var(--pmt-transition-fast);
}

.pmt-table tbody tr:hover {
    background: var(--pmt-gray-50, #fafbfc);
}

.pmt-row-warning {
    background: #fef2f2 !important;
}

.pmt-highlight-row {
    background: #dbeafe !important;
    font-weight: 600;
}

/* Side Effects Card */
.pmt-se-card {
    background: var(--pmt-white);
    border: 1px solid var(--pmt-gray-200);
    border-radius: var(--pmt-radius);
    overflow: hidden;
    box-shadow: var(--pmt-shadow);
}

.pmt-se-card h4 {
    margin: 0;
    padding: 1.5rem;
    background: var(--pmt-primary-gradient);
    color: white;
    font-size: 1.375rem;
    font-weight: 700;
}

.pmt-se-section {
    padding: 1.5rem;
}

.pmt-se-section h5 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    color: var(--pmt-gray-800);
    font-weight: 600;
}

.pmt-se-serious {
    background: linear-gradient(180deg, #fef2f2 0%, transparent 100%);
    border-top: 1px solid var(--pmt-gray-100);
}

.pmt-se-serious h5 {
    color: var(--pmt-danger);
}

/* Km Table */
.pmt-km-table-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--pmt-gray-200);
}

.pmt-km-table-section h4 {
    margin-bottom: 0.5rem;
}

.pmt-km-table-section > p {
    color: var(--pmt-gray-600);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* HAD Calculator */
.pmt-had-card,
.pmt-dose-card,
.pmt-ss-card,
.pmt-mc-card {
    background: linear-gradient(145deg, var(--pmt-white) 0%, #f0fdf4 100%);
    border: 2px solid var(--pmt-secondary);
    border-radius: var(--pmt-radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--pmt-shadow);
}

.pmt-had-main,
.pmt-dose-main,
.pmt-ss-main {
    margin: 1.5rem 0;
}

.pmt-had-value,
.pmt-dose-value,
.pmt-ss-value,
.pmt-big-number {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--pmt-primary);
    letter-spacing: -0.03em;
    line-height: 1;
}

.pmt-had-unit,
.pmt-dose-freq,
.pmt-ss-label,
.pmt-unit {
    font-size: 1.25rem;
    color: var(--pmt-gray-600);
    margin-left: 0.5rem;
    font-weight: 500;
}

.pmt-had-details,
.pmt-dose-details,
.pmt-ss-details {
    text-align: left;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--pmt-gray-200);
}

.pmt-conversion-factor {
    display: inline-block;
    background: var(--pmt-primary-gradient);
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 100px;
    font-weight: 700;
    margin-top: 1rem;
    box-shadow: var(--pmt-shadow-primary);
}

/* Radio/Checkbox */
.pmt-radio-group {
    display: flex;
    gap: 1.5rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.pmt-radio,
.pmt-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--pmt-gray-700);
}

.pmt-radio input,
.pmt-checkbox input {
    width: 20px;
    height: 20px;
    accent-color: var(--pmt-primary);
    cursor: pointer;
}

/* Symptom Grid */
.pmt-symptom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.pmt-symptom-grid .pmt-checkbox {
    padding: 0.75rem;
    background: var(--pmt-gray-100);
    border-radius: var(--pmt-radius-sm);
    transition: var(--pmt-transition-fast);
    border: 2px solid transparent;
}

.pmt-symptom-grid .pmt-checkbox:hover {
    background: var(--pmt-gray-200);
    border-color: var(--pmt-primary-light);
}

.pmt-symptom-grid .pmt-checkbox.selected {
    background: rgba(79, 70, 229, 0.1);
    border-color: var(--pmt-primary);
}

/* Condition Cards */
.pmt-condition-card,
.pmt-dx-card {
    background: var(--pmt-white);
    border: 1px solid var(--pmt-gray-200);
    border-radius: var(--pmt-radius-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--pmt-info);
    transition: var(--pmt-transition);
}

.pmt-condition-card:hover,
.pmt-dx-card:hover {
    box-shadow: var(--pmt-shadow);
}

.pmt-urgency-low {
    border-left-color: var(--pmt-success);
}

.pmt-urgency-moderate {
    border-left-color: var(--pmt-warning);
}

.pmt-urgency-high {
    border-left-color: var(--pmt-danger);
}

.pmt-urgency-emergency {
    border-left-color: #7c3aed;
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.08) 0%, transparent 50%);
}

.pmt-condition-header,
.pmt-dx-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.pmt-dx-number {
    width: 36px;
    height: 36px;
    background: var(--pmt-primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    font-size: 0.95rem;
    box-shadow: var(--pmt-shadow-primary);
}

.pmt-dx-content h5 {
    margin: 0 0 0.5rem 0;
    color: var(--pmt-gray-800);
    font-size: 1.1rem;
    font-weight: 600;
}

.pmt-dx-likelihood {
    display: inline-block;
    background: var(--pmt-gray-100);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--pmt-gray-700);
}

.pmt-urgency-badge {
    background: linear-gradient(135deg, var(--pmt-info) 0%, #0284c7 100%);
    color: white;
    padding: 0.3rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.pmt-match-bar {
    height: 8px;
    background: var(--pmt-gray-200);
    border-radius: 100px;
    overflow: hidden;
    margin: 0.75rem 0;
}

.pmt-match-fill {
    height: 100%;
    background: var(--pmt-primary-gradient);
    border-radius: 100px;
    transition: width 0.5s ease;
}

.pmt-match-text {
    font-size: 0.85rem;
    color: var(--pmt-gray-600);
}

/* Medical Calculator */
.pmt-mc-value {
    margin: 1.5rem 0;
}

.pmt-mc-interpretation {
    font-size: 1.125rem;
    color: var(--pmt-secondary);
    font-weight: 700;
    margin-bottom: 1rem;
}

.pmt-mc-formula code {
    background: var(--pmt-gray-100);
    padding: 0.625rem 1rem;
    border-radius: var(--pmt-radius-sm);
    display: inline-block;
    font-size: 0.9rem;
    font-family: 'Fira Code', 'SF Mono', Monaco, monospace;
    color: var(--pmt-gray-800);
}

/* Child Dose Results */
.pmt-child-dose-results {
    margin-top: 1rem;
}

.pmt-calc-card {
    background: var(--pmt-white);
    border: 1px solid var(--pmt-gray-200);
    border-radius: var(--pmt-radius-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: var(--pmt-transition);
}

.pmt-calc-card:hover {
    box-shadow: var(--pmt-shadow);
}

.pmt-calc-card h5 {
    margin: 0 0 0.5rem 0;
    color: var(--pmt-primary);
    font-size: 1.1rem;
    font-weight: 600;
}

.pmt-formula code {
    background: var(--pmt-gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: 'Fira Code', 'SF Mono', Monaco, monospace;
}

.pmt-calculation {
    color: var(--pmt-gray-600);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.pmt-dose-result {
    color: var(--pmt-secondary);
    font-size: 1.1rem;
    font-weight: 600;
}

.pmt-note {
    font-size: 0.85rem;
    color: var(--pmt-gray-500);
}

/* Dictionary */
.pmt-dict-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--pmt-gray-100);
    background: var(--pmt-gray-50, #fafbfc);
}

.pmt-dict-header h4 {
    margin: 0;
    font-size: 1.625rem;
    color: var(--pmt-primary);
    font-weight: 700;
}

.pmt-dict-category {
    background: linear-gradient(135deg, var(--pmt-secondary) 0%, var(--pmt-secondary-dark) 100%);
    color: white;
    padding: 0.35rem 0.875rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
}

.pmt-dict-icd {
    background: var(--pmt-gray-200);
    padding: 0.35rem 0.875rem;
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--pmt-gray-700);
    font-weight: 500;
}

.pmt-dict-body {
    padding: 1.5rem;
}

.pmt-dict-definition {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: var(--pmt-gray-700);
}

.pmt-dict-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--pmt-gray-100);
    font-size: 0.95rem;
    line-height: 1.6;
}

.pmt-dict-section strong {
    color: var(--pmt-gray-800);
}

/* Disclaimer */
.pmt-disclaimer {
    background: linear-gradient(145deg, #fef3c7 0%, #fef9c3 100%);
    border: 1px solid #fbbf24;
    border-radius: var(--pmt-radius);
    padding: 1.5rem 2rem;
    margin-top: 3rem;
    box-shadow: var(--pmt-shadow);
}

.pmt-disclaimer h4 {
    margin: 0 0 1rem 0;
    color: #92400e;
    font-size: 1.125rem;
    font-weight: 700;
}

.pmt-disclaimer p {
    margin: 0.625rem 0;
    color: #78350f;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* AI Features */
.pmt-btn-group {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.pmt-btn-secondary {
    background: var(--pmt-gray-100);
    color: var(--pmt-gray-700);
    border: 2px solid var(--pmt-gray-200);
}

.pmt-btn-secondary:hover {
    background: var(--pmt-gray-200);
    border-color: var(--pmt-gray-300);
    transform: translateY(-2px);
}

/* AI Loading State with Progress Circle */
.pmt-loading-ai {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--pmt-gray-600);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05) 0%, rgba(79, 70, 229, 0.05) 100%);
    border-radius: var(--pmt-radius);
    border: 1px dashed var(--pmt-accent);
}

.pmt-loading-ai p {
    margin: 1rem 0 0;
    font-size: 0.95rem;
}

/* Large Progress Text */
.pmt-progress-text-large {
    font-size: 3rem;
    font-weight: 900;
    color: var(--pmt-accent);
    text-align: center;
    margin: 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pmt-loading-message-large {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--pmt-gray-700);
    text-align: center;
    margin: 1rem 0 0;
}

.pmt-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--pmt-gray-200);
    border-top: 4px solid var(--pmt-accent);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* AI Loading with dots */
.pmt-loading-dots {
    display: inline-flex;
    gap: 6px;
    margin-left: 8px;
}

.pmt-loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--pmt-accent);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.pmt-loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.pmt-loading-dots span:nth-child(2) { animation-delay: -0.16s; }
.pmt-loading-dots span:nth-child(3) { animation-delay: 0; }

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Streaming Styles */
.pmt-streaming .pmt-ai-badge {
    background: linear-gradient(135deg, #06b6d4 0%, #0ea5e9 100%);
}

.pmt-streaming-indicator {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}

.pmt-streaming-indicator span {
    width: 6px;
    height: 6px;
    background: var(--pmt-secondary);
    border-radius: 50%;
    animation: streamPulse 1s infinite ease-in-out;
}

.pmt-streaming-indicator span:nth-child(1) { animation-delay: 0s; }
.pmt-streaming-indicator span:nth-child(2) { animation-delay: 0.2s; }
.pmt-streaming-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes streamPulse {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.pmt-stream-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--pmt-text);
    margin: 0;
    padding: 0;
}

.pmt-stream-content p {
    margin: 0 0 0.75rem 0;
    padding: 0;
}

.pmt-stream-content p:last-child {
    margin-bottom: 0;
}

/* Prevent layout shifts during streaming */
.pmt-streaming .pmt-stream-content {
    min-height: 1.6em; /* Ensure minimum height to prevent jumping */
}

.pmt-stream-content h1,
.pmt-stream-content h2,
.pmt-stream-content h3,
.pmt-stream-content h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--pmt-dark);
}

.pmt-stream-content h3 {
    font-size: 1.25rem;
}

.pmt-stream-content ul,
.pmt-stream-content ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.pmt-stream-content li {
    margin-bottom: 0.5rem;
}

.pmt-stream-content code {
    background: var(--pmt-gray-100);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Consolas', monospace;
    font-size: 0.875em;
    color: var(--pmt-primary);
}

.pmt-stream-content pre {
    background: var(--pmt-gray-900);
    color: var(--pmt-gray-100);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.pmt-stream-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.pmt-stream-content strong {
    font-weight: 600;
    color: var(--pmt-dark);
}

.pmt-stream-content blockquote {
    border-left: 4px solid var(--pmt-primary);
    padding-left: 1rem;
    margin: 1rem 0;
    color: var(--pmt-gray-600);
    font-style: italic;
}

/* Streaming cursor animation */
.pmt-cursor {
    display: inline-block;
    color: var(--pmt-primary);
    animation: cursorBlink 0.8s infinite;
    font-weight: normal;
    margin-left: 2px;
}

@keyframes cursorBlink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Hide cursor when streaming is complete */
.pmt-ai-results:not(.pmt-streaming) .pmt-cursor {
    display: none;
}

.pmt-ai-results {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.pmt-ai-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}

.pmt-ai-badge {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 50%, #6d28d9 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pmt-ai-badge::before {
    content: '✨';
}

.pmt-cached-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* AI Content - Markdown Rendering */
.pmt-ai-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--pmt-gray-700);
}

.pmt-ai-content h1,
.pmt-ai-content h2,
.pmt-ai-content h3,
.pmt-ai-content h4,
.pmt-ai-content h5,
.pmt-ai-content h6 {
    margin: 1.5rem 0 0.75rem;
    font-weight: 700;
    color: var(--pmt-gray-800);
    line-height: 1.3;
}

.pmt-ai-content h1 { font-size: 1.5rem; }
.pmt-ai-content h2 { font-size: 1.35rem; }
.pmt-ai-content h3 { font-size: 1.2rem; color: var(--pmt-accent); }
.pmt-ai-content h4 { font-size: 1.1rem; }
.pmt-ai-content h5 { font-size: 1rem; }
.pmt-ai-content h6 { font-size: 0.95rem; }

.pmt-ai-content p {
    margin: 0.75rem 0;
}

.pmt-ai-content strong {
    font-weight: 700;
    color: var(--pmt-gray-800);
}

.pmt-ai-content em {
    font-style: italic;
}

.pmt-ai-content ul,
.pmt-ai-content ol {
    margin: 0.75rem 0;
    padding-left: 1.5rem;
}

.pmt-ai-content li {
    margin: 0.35rem 0;
    line-height: 1.6;
}

.pmt-ai-content ul li::marker {
    color: var(--pmt-accent);
}

.pmt-ai-content ol li::marker {
    color: var(--pmt-accent);
    font-weight: 600;
}

.pmt-ai-content code {
    background: var(--pmt-gray-100);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 0.85em;
    color: var(--pmt-primary);
}

.pmt-ai-content pre {
    background: var(--pmt-gray-800);
    color: var(--pmt-gray-100);
    padding: 1rem;
    border-radius: var(--pmt-radius-sm);
    overflow-x: auto;
    margin: 1rem 0;
}

.pmt-ai-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.pmt-ai-content blockquote {
    border-left: 4px solid var(--pmt-accent);
    margin: 1rem 0;
    padding: 0.5rem 1rem;
    background: rgba(139, 92, 246, 0.05);
    color: var(--pmt-gray-600);
    font-style: italic;
}

.pmt-ai-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.9rem;
}

.pmt-ai-content th,
.pmt-ai-content td {
    border: 1px solid var(--pmt-gray-200);
    padding: 0.6rem 0.8rem;
    text-align: left;
}

.pmt-ai-content th {
    background: var(--pmt-gray-100);
    font-weight: 600;
    color: var(--pmt-gray-800);
}

.pmt-ai-content tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.02);
}

.pmt-ai-content hr {
    border: none;
    border-top: 2px solid var(--pmt-gray-200);
    margin: 1.5rem 0;
}

.pmt-ai-content a {
    color: var(--pmt-primary);
    text-decoration: underline;
}

.pmt-ai-content a:hover {
    color: var(--pmt-primary-dark);
}

.pmt-general-advice {
    background: linear-gradient(90deg, #f0f9ff 0%, rgba(240, 249, 255, 0.5) 100%);
    border-left: 4px solid var(--pmt-info);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    border-radius: 0 var(--pmt-radius-sm) var(--pmt-radius-sm) 0;
}

.pmt-general-advice h5 {
    margin: 0 0 0.5rem 0;
    color: var(--pmt-gray-800);
    font-size: 1rem;
}

.pmt-red-flags {
    color: #b91c1c;
    margin-top: 0.75rem !important;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.pmt-red-flags::before {
    content: '⚠️';
}

.pmt-ai-raw {
    background: var(--pmt-gray-100);
    padding: 1.25rem;
    border-radius: var(--pmt-radius-sm);
    border: 1px solid var(--pmt-gray-200);
    font-family: 'Fira Code', 'SF Mono', Monaco, monospace;
    white-space: pre-wrap;
    line-height: 1.6;
    font-size: 0.85rem;
    color: var(--pmt-gray-700);
    overflow-x: auto;
}

/* AI Info Card */
.pmt-ai-info-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08) 0%, rgba(79, 70, 229, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--pmt-radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.pmt-ai-info-card h5 {
    margin: 0 0 0.75rem 0;
    color: var(--pmt-accent);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pmt-ai-info-card p {
    margin: 0;
    color: var(--pmt-gray-600);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* AI Response Sections */
.pmt-ai-section {
    margin-bottom: 1.5rem;
}

.pmt-ai-section h5 {
    color: var(--pmt-gray-800);
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pmt-ai-section p {
    color: var(--pmt-gray-600);
    line-height: 1.7;
    margin: 0;
}

.pmt-ai-section ul {
    margin: 0.5rem 0;
    padding-left: 1.25rem;
}

.pmt-ai-section li {
    color: var(--pmt-gray-600);
    line-height: 1.6;
    margin-bottom: 0.375rem;
}

/* Responsive */
@media (max-width: 768px) {
    .pmt-tools-container {
        padding: 2rem 1rem;
    }
    
    .pmt-section-title {
        font-size: 1.875rem;
    }
    
    .pmt-tools-grid {
        grid-template-columns: 1fr;
    }

    .pmt-input-row {
        grid-template-columns: 1fr;
    }

    .pmt-had-value,
    .pmt-dose-value,
    .pmt-ss-value,
    .pmt-big-number {
        font-size: 2.5rem;
    }

    .pmt-radio-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .pmt-symptom-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .pmt-tool-header {
        padding: 1.5rem;
    }
    
    .pmt-tool-header h3 {
        font-size: 1.375rem;
    }
    
    .pmt-btn-group {
        flex-direction: column;
    }
    
    .pmt-btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .pmt-tool-header {
        background: var(--pmt-gray-200) !important;
        color: var(--pmt-dark) !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .pmt-btn {
        display: none !important;
    }
    
    .pmt-quick-search,
    .pmt-quick-check {
        display: none !important;
    }
}

/* AI Info Card */
.pmt-ai-info-card {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(79, 70, 229, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: var(--pmt-radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.pmt-ai-info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--pmt-accent) 0%, var(--pmt-primary) 100%);
}

.pmt-ai-info-card h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--pmt-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pmt-ai-info-card p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--pmt-gray-600);
    line-height: 1.5;
}

/* AI Button Specific Styles */
.pmt-btn-ai {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
}

.pmt-btn-ai::before {
    content: '🤖';
    margin-right: 0.5rem;
}

.pmt-btn-ai:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
}

/* Patient Info Display */
.pmt-patient-info {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--pmt-gray-100);
    border-radius: var(--pmt-radius-sm);
    margin-bottom: 1rem;
}

.pmt-patient-info span {
    font-size: 0.875rem;
    color: var(--pmt-gray-700);
    padding: 0.25rem 0.75rem;
    background: var(--pmt-white);
    border-radius: 20px;
    border: 1px solid var(--pmt-gray-200);
}

/* Drug Name and Term Display */
.pmt-drug-name,
.pmt-term-name,
.pmt-calc-name,
.pmt-species-info,
.pmt-study-type,
.pmt-interaction-drugs {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--pmt-primary);
    background: rgba(79, 70, 229, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
}

/* Enhanced Interaction Card */
.pmt-interaction-card {
    border-radius: var(--pmt-radius);
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: var(--pmt-shadow);
}

.pmt-interaction-header {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.pmt-interaction-header h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
}

.pmt-interaction-details {
    padding: 1.25rem;
    background: var(--pmt-white);
}

/* Severity Styles */
.pmt-severity-major,
.pmt-urgency-high {
    border-left: 4px solid var(--pmt-danger);
}

.pmt-severity-major .pmt-interaction-header,
.pmt-urgency-high .pmt-condition-header {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
}

.pmt-severity-moderate,
.pmt-urgency-moderate {
    border-left: 4px solid var(--pmt-warning);
}

.pmt-severity-moderate .pmt-interaction-header,
.pmt-urgency-moderate .pmt-condition-header {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.05) 100%);
}

.pmt-severity-minor,
.pmt-urgency-low {
    border-left: 4px solid var(--pmt-success);
}

.pmt-severity-minor .pmt-interaction-header,
.pmt-urgency-low .pmt-condition-header {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
}

.pmt-severity-contraindicated,
.pmt-urgency-emergency {
    border-left: 4px solid #7c2d12;
}

.pmt-severity-contraindicated .pmt-interaction-header,
.pmt-urgency-emergency .pmt-condition-header {
    background: linear-gradient(135deg, rgba(124, 45, 18, 0.15) 0%, rgba(239, 68, 68, 0.1) 100%);
}

.pmt-severity-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pmt-severity-major .pmt-severity-badge { background: var(--pmt-danger); color: white; }
.pmt-severity-moderate .pmt-severity-badge { background: var(--pmt-warning); color: white; }
.pmt-severity-minor .pmt-severity-badge { background: var(--pmt-success); color: white; }
.pmt-severity-contraindicated .pmt-severity-badge { background: #7c2d12; color: white; }

/* Highlight Box */
.pmt-highlight {
    background: rgba(79, 70, 229, 0.05);
    border-left: 3px solid var(--pmt-primary);
    padding-left: 1rem !important;
    margin: 0.5rem 0;
}

/* Detail Row */
.pmt-detail-row {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--pmt-gray-200);
    font-size: 0.9375rem;
    color: var(--pmt-gray-700);
    line-height: 1.6;
}

.pmt-detail-row:last-child {
    border-bottom: none;
}

.pmt-detail-row strong {
    color: var(--pmt-dark);
}

/* Red Flags */
.pmt-red-flags {
    background: rgba(239, 68, 68, 0.1);
    color: var(--pmt-danger);
    padding: 0.75rem 1rem;
    border-radius: var(--pmt-radius-sm);
    font-size: 0.875rem;
    margin-top: 0.75rem;
}

/* Differential Diagnosis Cards */
.pmt-dx-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--pmt-white);
    border-radius: var(--pmt-radius);
    margin-bottom: 0.75rem;
    box-shadow: var(--pmt-shadow-sm);
    border: 1px solid var(--pmt-gray-200);
    transition: var(--pmt-transition-fast);
}

.pmt-dx-card:hover {
    box-shadow: var(--pmt-shadow);
    border-color: var(--pmt-primary-light);
}

.pmt-dx-number {
    width: 36px;
    height: 36px;
    background: var(--pmt-primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.pmt-dx-content h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: var(--pmt-dark);
}

.pmt-dx-likelihood {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--pmt-info);
    color: white;
    margin-bottom: 0.5rem;
}

/* General Advice Box */
.pmt-general-advice {
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    border-radius: var(--pmt-radius);
    border-left: 4px solid var(--pmt-info);
    margin-top: 1rem;
    font-size: 0.9375rem;
    color: var(--pmt-gray-700);
}

/* Cached Badge Update */
.pmt-cached-badge,
.pmt-ai-cached {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    color: var(--pmt-success);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Match Bar for Symptom Checker */
.pmt-match-bar {
    height: 6px;
    background: var(--pmt-gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.pmt-match-fill {
    height: 100%;
    background: var(--pmt-primary-gradient);
    border-radius: 3px;
    transition: width 0.5s ease-out;
}

.pmt-match-text {
    font-size: 0.75rem;
    color: var(--pmt-gray-500);
}

/* Condition Card */
.pmt-condition-card {
    background: var(--pmt-white);
    border-radius: var(--pmt-radius);
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: var(--pmt-shadow-sm);
    border: 1px solid var(--pmt-gray-200);
}

.pmt-condition-header {
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.pmt-condition-header h5 {
    margin: 0;
    font-size: 1rem;
    color: var(--pmt-dark);
}

.pmt-urgency-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.pmt-urgency-emergency .pmt-urgency-badge { background: #7c2d12; color: white; }
.pmt-urgency-high .pmt-urgency-badge { background: var(--pmt-danger); color: white; }
.pmt-urgency-moderate .pmt-urgency-badge { background: var(--pmt-warning); color: white; }
.pmt-urgency-low .pmt-urgency-badge { background: var(--pmt-success); color: white; }

.pmt-condition-desc {
    padding: 0 1.25rem 1rem;
    font-size: 0.9375rem;
    color: var(--pmt-gray-600);
    margin: 0;
}

/* Typed Symptoms Input */
.pmt-symptom-input-wrapper {
    position: relative;
}

.pmt-typed-symptoms-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
    min-height: 20px;
}

.pmt-typed-symptom-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, var(--pmt-primary-light) 0%, var(--pmt-primary) 100%);
    color: white;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.pmt-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: var(--pmt-transition-fast);
    padding: 0;
}

.pmt-tag-remove:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}