/* ==============================================
   Chemo Protocols Styles
   ============================================== */

/* Protocols Container */
.protocols-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Protocol Tabs */
.protocols-tabs {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}

.protocol-tab {
    background: var(--surface);
    border: 2px solid var(--border);
    border-bottom: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.protocol-tab:hover {
    background: var(--surface-alt);
    transform: translateY(-2px);
}

.protocol-tab.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.protocol-tab i {
    font-size: 1.1rem;
}

/* Protocol Content */
.protocols-content {
    min-height: 400px;
}

/* Protocol Type Header */
.protocol-type-header {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.protocol-type-header i {
    font-size: 2rem;
    color: var(--primary-color);
}

.protocol-type-header h2 {
    margin: 0;
    color: var(--text-primary);
}

/* Protocols Grid */
.protocols-grid {
    display: grid;
    gap: 2rem;
}

/* Protocol Card */
.protocol-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 2rem;
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.protocol-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

/* Protocol Header */
.protocol-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
}

.protocol-header h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 0;
    flex: 1;
}

.protocol-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Protocol Indication */
.protocol-indication {
    background: var(--surface-alt);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-color);
}

.protocol-indication i {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Protocol Details */
.protocol-details {
    display: grid;
    gap: 1.5rem;
}

.protocol-section {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.protocol-section h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Protocol Table */
.protocol-table {
    width: 100%;
    border-collapse: collapse;
}

.protocol-table tr {
    border-bottom: 1px solid var(--border);
}

.protocol-table tr:last-child {
    border-bottom: none;
}

.protocol-table td {
    padding: 0.75rem 0;
    vertical-align: top;
}

.protocol-table td:first-child {
    width: 40%;
    color: var(--text-secondary);
}

.protocol-table td:last-child {
    width: 60%;
    color: var(--text-primary);
}

/* Highlights */
.highlight-dose {
    background: #fef3c7;
    color: #92400e;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
    font-size: 1.1rem;
}

.highlight-temp {
    background: #fee2e2;
    color: #991b1b;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
}

.highlight-duration {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 700;
}

.highlight-value {
    background: var(--primary-light);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Protocol Lists */
.protocol-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.protocol-list li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-primary);
    line-height: 1.6;
}

.protocol-list li::before {
    content: "▸";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

/* Warning Section */
.warning-section {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

[data-theme="dark"] .warning-section {
    background: #78350f;
    border-left-color: #fbbf24;
}

.warning-list li::before {
    content: "⚠";
    color: #f59e0b;
}

/* Evidence Section */
.evidence-section {
    background: #dbeafe;
    border-left: 4px solid #3b82f6;
}

[data-theme="dark"] .evidence-section {
    background: #1e3a8a;
    border-left-color: #60a5fa;
}

.evidence-section p {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

/* Protocol Actions */
.protocol-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* General Info Sections */
.general-info-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.general-info-header i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.general-info-header h2 {
    margin: 0;
    color: var(--text-primary);
}

.info-section {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 2px solid var(--border);
}

.info-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Techniques Grid */
.techniques-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.technique-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.technique-card h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.technique-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
}

.technique-details {
    display: grid;
    gap: 1rem;
}

.advantages h5 {
    color: var(--medical-green);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.disadvantages h5 {
    color: var(--medical-red);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.technique-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.technique-details li {
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: 0.9rem;
}

.advantages li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--medical-green);
    font-weight: bold;
}

.disadvantages li::before {
    content: "✗";
    position: absolute;
    left: 0;
    color: var(--medical-red);
    font-weight: bold;
}

/* Safety Section */
.safety-section {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
}

[data-theme="dark"] .safety-section {
    background: #78350f;
}

.safety-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.75rem;
}

.safety-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--background);
    border-radius: 6px;
}

.safety-list i {
    color: var(--medical-green);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

/* Carriers Grid */
.carriers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.carrier-card {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid var(--border);
}

.carrier-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.carrier-card p {
    margin: 0.5rem 0;
    color: var(--text-primary);
}

.carrier-notes {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
    margin-top: 0.75rem !important;
}

.carrier-notes i {
    color: var(--primary-color);
}

/* Guidelines Table */
.guidelines-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--background);
}

.guidelines-table thead {
    background: var(--primary-color);
    color: white;
}

.guidelines-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.guidelines-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.guidelines-table tr:last-child td {
    border-bottom: none;
}

.guidelines-table tr:hover {
    background: var(--surface-alt);
}

/* Responsive Design */
@media (max-width: 768px) {
    .protocols-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 1rem;
    }
    
    .protocol-tab {
        flex-shrink: 0;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .protocol-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .protocol-badge {
        align-self: flex-start;
    }
    
    .protocol-table td:first-child {
        width: 45%;
    }
    
    .protocol-table td:last-child {
        width: 55%;
    }
    
    .protocol-actions {
        flex-direction: column;
    }
    
    .protocol-actions button {
        width: 100%;
    }
    
    .techniques-grid,
    .carriers-grid {
        grid-template-columns: 1fr;
    }
    
    .guidelines-table {
        font-size: 0.85rem;
    }
    
    .guidelines-table th,
    .guidelines-table td {
        padding: 0.75rem 0.5rem;
    }
}

/* Dark Theme */
[data-theme="dark"] .protocol-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .protocol-section {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .protocol-indication {
    background: #334155;
}

[data-theme="dark"] .technique-card {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .carrier-card {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .guidelines-table {
    background: #0f172a;
}

[data-theme="dark"] .safety-list li {
    background: #0f172a;
}

[data-theme="dark"] .highlight-dose {
    background: #78350f;
    color: #fef3c7;
}

[data-theme="dark"] .highlight-temp {
    background: #991b1b;
    color: #fee2e2;
}

[data-theme="dark"] .highlight-duration {
    background: #1e40af;
    color: #dbeafe;
}

/* Print Styles */
@media print {
    .protocols-tabs,
    .protocol-actions,
    .modal-header button {
        display: none;
    }
    
    .protocol-card {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 1rem;
    }
    
    .protocol-section {
        page-break-inside: avoid;
    }
}
