/* SEIR Model Page Specific Styles - Single Responsibility */
@import url('NavigationStyles.css');

/* SEIR-specific layout with compact sizing */
.seir-layout {
    width: 100%;
    height: calc(100vh - 100px); /* Full viewport minus navigation */
    max-height: calc(100vh - 100px);
    display: flex;
    gap: var(--spacing-xs); /* Reduced gap */
    padding: var(--spacing-xs); /* Reduced padding */
    overflow: hidden; /* Prevent overall page overflow */
    font-size: 14px; /* Reduced base font size */
}

/* SEIR column component with compact styling */
.seir-column {
    flex: 1;
    height: 100%; /* Use full available height */
    max-height: 100%;
    background-color: var(--content-background);
    padding: var(--spacing-md); /* Reduced padding */
    border-radius: var(--radius-md);
    border: 1px solid var(--primary-accent);
    box-shadow: 0 2px 10px var(--shadow-color);
    overflow-y: auto; /* Allow scrolling within column if needed */
    display: flex;
    flex-direction: column;
}

.seir-column__title {
    color: var(--accent-dark);
    margin: 0 0 var(--spacing-md) 0; /* Reduced margin */
    padding-bottom: var(--spacing-xs); /* Reduced padding */
    border-bottom: 2px solid var(--accent-dark);
    font-size: 1.1em; /* Reduced from 1.3em */
    flex-shrink: 0; /* Don't shrink titles */
}

/* SEIR parameter component with compact sizing */
.seir-parameter {
    width: 100%;
    padding: var(--spacing-xs); /* Reduced padding */
    margin-bottom: var(--spacing-sm); /* Reduced margin */
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--spacing-xs); /* Reduced gap */
    background-color: var(--accent-background);
    border-radius: var(--radius-sm); /* Smaller radius */
    flex-shrink: 0; /* Don't shrink parameters */
    font-size: 13px; /* Smaller font for parameters */
}

.seir-parameter__label {
    flex: 0 0 50px; /* Reduced width */
    text-align: center;
    color: white;
    background-color: var(--secondary-accent);
    padding: var(--spacing-xs) 2px; /* Reduced padding */
    border-radius: var(--radius-sm);
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 32px; /* Reduced height */
    font-size: 12px; /* Smaller font */
}

.seir-parameter__control {
    flex: 0 0 130px; /* Reduced width */
    display: flex;
    flex-direction: column;
    gap: 2px; /* Reduced gap */
}

.seir-parameter__value {
    text-align: center;
    color: var(--text-primary);
    font-weight: bold;
    min-height: 16px; /* Reduced height */
    font-size: 11px; /* Smaller font */
}

.seir-parameter__input {
    flex: 0 0 100px; /* Reduced width */
    display: flex;
    align-items: center;
}

.seir-parameter__input input {
    width: 100%;
    padding: 4px; /* Reduced padding */
    border: 1px solid var(--primary-accent);
    border-radius: var(--radius-sm);
    background-color: var(--content-background);
    font-size: 12px; /* Smaller font */
}

.seir-parameter__description {
    flex: 1;
    min-width: 200px; /* Reduced min-width */
    padding: var(--spacing-xs); /* Reduced padding */
    color: white;
    background-color: var(--secondary-accent);
    border-radius: var(--radius-sm);
    line-height: 1.3; /* Tighter line height */
    font-size: 12px; /* Smaller font */
}

/* SEIR slider component */
.seir-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    background: #d3d3d3;
    outline: none;
    opacity: 0.7;
    -webkit-transition: .2s;
    transition: opacity .2s;
    border-radius: var(--radius-sm);
    height: 6px; /* Reduced height */
}

.seir-slider:hover {
    opacity: 1;
}

.seir-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px; /* Reduced size */
    height: 16px; /* Reduced size */
    border-radius: 50%;
    background: var(--primary-accent);
    cursor: pointer;
}

.seir-slider::-moz-range-thumb {
    width: 16px; /* Reduced size */
    height: 16px; /* Reduced size */
    border-radius: 50%;
    background: var(--primary-accent);
    cursor: pointer;
    border: none;
}

/* SEIR chart component */
.seir-chart {
    width: 100%;
    flex: 1; /* Take remaining space */
    min-height: 250px; /* Reduced minimum chart height */
    margin-top: var(--spacing-sm); /* Reduced margin */
}

/* SEIR results component with compact styling */
.seir-results__item {
    background-color: var(--accent-background);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs); /* Reduced padding */
    margin: 2px 0; /* Reduced margin */
    flex-shrink: 0; /* Don't shrink results */
    font-size: 12px; /* Smaller font */
    line-height: 1.3; /* Tighter line height */
}

.seir-results__value {
    display: inline;
    font-weight: bold;
    color: var(--accent-dark);
    font-size: 12px; /* Smaller font */
}

/* Parameters container */
.parameters {
    flex-shrink: 0; /* Don't shrink the parameters section */
}

/* SEIR mobile responsiveness */
@media (max-width: 1024px) {
    .seir-layout {
        flex-direction: column;
        height: auto; /* Allow natural height on mobile */
        max-height: none;
        font-size: 13px; /* Even smaller on mobile */
    }
    
    .seir-column {
        height: auto;
        max-height: none;
        min-height: 250px; /* Reduced minimum height on mobile */
        padding: var(--spacing-sm);
    }
    
    .seir-chart {
        height: 300px; /* Reduced height on mobile */
        flex: none;
        min-height: 200px;
    }
    
    .seir-parameter {
        flex-direction: column;
        align-items: stretch;
    }
    
    .seir-parameter__label {
        flex: none;
        width: 100%;
        text-align: center;
        min-height: 28px;
    }
    
    .seir-parameter__control {
        flex: none;
        width: 100%;
    }
    
    .seir-parameter__input {
        flex: none;
        width: 100%;
    }
    
    .seir-parameter__description {
        flex: none;
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .seir-layout {
        padding: 2px; /* Minimal padding */
        gap: 2px; /* Minimal gap */
        height: calc(100vh - 80px); /* Adjust for smaller mobile nav */
        font-size: 12px; /* Even smaller font */
    }
    
    .seir-column {
        padding: var(--spacing-xs);
    }
    
    .seir-parameter {
        padding: 4px; /* Minimal padding */
        margin-bottom: var(--spacing-xs);
    }
    
    .seir-parameter__label {
        flex: 0 0 40px; /* Even smaller */
        padding: 4px 2px;
        font-size: 11px;
        min-height: 24px;
    }
    
    .seir-column__title {
        font-size: 1em; /* Smaller title */
        margin-bottom: var(--spacing-sm);
    }
    
    .seir-chart {
        height: 250px; /* Smaller chart */
        min-height: 200px;
    }
    
    .seir-parameter__description {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .seir-results__item {
        font-size: 11px;
        padding: 4px;
    }
}

/* Firefox specific fixes */
@-moz-document url-prefix() {
    .seir-layout {
        height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
    }
    
    .seir-column {
        height: 100%;
        max-height: 100%;
    }
    
    .seir-chart {
        height: auto;
        flex: 1;
        min-height: 250px;
    }
}
