/* Treatment Provider Keywords Report Stylesheet */

/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
    padding: 20px;
}

/* Report container */
.report-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header styles */
.report-header {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: white;
    padding: 2rem;
    text-align: center;
}

.report-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.report-metadata {
    font-size: 1.1rem;
    opacity: 0.9;
}

.timestamp {
    font-family: 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
}

/* Summary section */
.report-summary {
    padding: 2rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.summary-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #3498db;
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.stat-label {
    font-weight: 600;
    color: #555;
    display: block;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Report data section */
.report-data {
    padding: 2rem;
}

.data-title {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid #3498db;
    padding-bottom: 0.5rem;
    display: inline-block;
}

/* Table styles */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-header {
    background: linear-gradient(135deg, #34495e, #2c3e50);
    color: white;
}

.header-row th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Column widths */
.col-item-id {
    width: 8%;
    min-width: 100px;
}

.col-item-name {
    width: 20%;
    min-width: 200px;
}

.col-path {
    width: 25%;
    min-width: 250px;
}

.col-treatment-tags {
    width: 15%;
    min-width: 150px;
}

.col-providers {
    width: 27%;
    min-width: 250px;
}

.col-count {
    width: 5%;
    text-align: center;
}

/* Table body */
.table-body .data-row {
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.data-row:hover {
    background-color: #f8f9fa;
}

.data-row td {
    padding: 1rem;
    vertical-align: top;
}

/* Row types */
.has-providers {
    background-color: #f8fff8;
}

.has-providers:hover {
    background-color: #e8f5e8;
}

.no-providers {
    background-color: #fff8f8;
}

.no-providers:hover {
    background-color: #ffeaea;
}

/* Cell content */
.cell-item-id {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #666;
    word-break: break-all;
}

.cell-item-name {
    font-weight: 600;
    color: #2c3e50;
}

.cell-path {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: #666;
    word-break: break-all;
}

.cell-count {
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.has-providers .cell-count {
    color: #27ae60;
}

.no-providers .cell-count {
    color: #e74c3c;
}

/* Tags */
.tag-item {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 0.2rem 0.2rem 0.2rem 0;
    font-weight: 500;
}

/* Providers */
.provider-item {
    display: inline-block;
    background: #27ae60;
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    margin: 0.1rem 0.1rem 0.1rem 0;
    font-weight: 500;
    line-height: 1.2;
}

/* Compress provider cells with many items */
.cell-providers-searchable {
    max-height: 120px;
    overflow-y: auto;
    line-height: 1.3;
}

/* Alternative: Show providers in a more compact list format */
.cell-providers-searchable.compact {
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
    max-height: 100px;
    overflow-y: auto;
}

.cell-providers-searchable.compact .provider-item {
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    margin: 0;
    border-radius: 8px;
}

/* Footer */
.report-footer {
    background: #2c3e50;
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.footer-text {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 1200px) {
    .report-container {
        margin: 0 10px;
    }
    
    .results-table {
        font-size: 0.8rem;
    }
    
    .header-row th,
    .data-row td {
        padding: 0.8rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .report-title {
        font-size: 2rem;
    }
    
    .report-header {
        padding: 1.5rem;
    }
    
    .report-summary,
    .report-data {
        padding: 1.5rem;
    }
    
    .summary-stats {
        grid-template-columns: 1fr;
    }
    
    .results-table {
        font-size: 0.7rem;
    }
    
    .header-row th,
    .data-row td {
        padding: 0.6rem;
    }
    
    /* Hide less important columns on mobile */
    .col-item-id,
    .col-path {
        display: none;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        padding: 0;
    }
    
    .report-container {
        box-shadow: none;
        border-radius: 0;
    }
    
    .report-header {
        background: #2c3e50 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .data-row:hover {
        background-color: transparent !important;
    }
    
    .has-providers {
        background-color: #f8fff8 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .no-providers {
        background-color: #fff8f8 !important;
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}
