/**
 * Score Entry Modal Styles
 *
 * ARCHITECTURE: Styles for clinical score entry modal (CIWA, NIHSS, GCS)
 * WHY: Accessible, themed modal for score component entry
 */

/* Modal Overlay */
.sem-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.sem-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Modal Container */
.sem-modal {
    background: var(--sol-bg-elevated, #1e1e2e);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: transform 0.2s;
}

.sem-modal-overlay.visible .sem-modal {
    transform: translateY(0);
}

/* Header */
.sem-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--sol-border, #3a3a4a);
}

.sem-header-left {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sem-header h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--sol-text-primary, #e0e0e0);
}

.sem-subtitle {
    font-size: 0.85rem;
    color: var(--sol-text-secondary, #a0a0b0);
}

.sem-close-btn {
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--sol-text-secondary, #a0a0b0);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.sem-close-btn:hover {
    color: var(--sol-text-primary, #e0e0e0);
}

/* Body */
.sem-body {
    padding: 1.25rem 1.5rem;
    overflow-y: auto;
    flex: 1;
}

/* Total Display */
.sem-total-display {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--sol-bg-surface, #2a2a3a);
    border-radius: 8px;
}

.sem-total-label {
    font-size: 1rem;
    color: var(--sol-text-secondary, #a0a0b0);
}

.sem-total-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--sol-text-primary, #e0e0e0);
    line-height: 1;
}

.sem-total-max {
    font-size: 1rem;
    color: var(--sol-text-secondary, #a0a0b0);
}

/* Severity colors for total */
.sem-total-value.severity-green { color: #22c55e; }
.sem-total-value.severity-yellow { color: #eab308; }
.sem-total-value.severity-orange { color: #f97316; }
.sem-total-value.severity-red { color: #ef4444; }
.sem-total-value.severity-darkred { color: #dc2626; }

/* Interpretation */
.sem-interpretation {
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    background: var(--sol-bg-surface, #2a2a3a);
    color: var(--sol-text-secondary, #a0a0b0);
    border-left: 4px solid var(--sol-border, #3a3a4a);
}

.sem-interpretation.severity-green { border-left-color: #22c55e; color: #86efac; }
.sem-interpretation.severity-yellow { border-left-color: #eab308; color: #fde047; }
.sem-interpretation.severity-orange { border-left-color: #f97316; color: #fdba74; }
.sem-interpretation.severity-red { border-left-color: #ef4444; color: #fca5a5; }
.sem-interpretation.severity-darkred { border-left-color: #dc2626; color: #f87171; }

/* Components Container */
.sem-components {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Individual Component */
.sem-component {
    padding: 1rem;
    background: var(--sol-bg-surface, #2a2a3a);
    border-radius: 8px;
    border: 1px solid var(--sol-border, #3a3a4a);
}

.sem-component-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.sem-component-header label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--sol-text-primary, #e0e0e0);
}

.sem-component-value-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--sol-accent, #60a5fa);
    min-width: 2rem;
    text-align: right;
}

.sem-component-slider-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

/* Slider Styling */
.sem-component-input {
    flex: 1;
    height: 8px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--sol-bg-elevated, #1e1e2e);
    border-radius: 4px;
    outline: none;
}

.sem-component-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--sol-accent, #60a5fa);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.1s;
}

.sem-component-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.sem-component-input::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--sol-accent, #60a5fa);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.sem-component-range {
    font-size: 0.75rem;
    color: var(--sol-text-secondary, #a0a0b0);
    min-width: 2.5rem;
    text-align: right;
}

/* Component Descriptions */
.sem-component-descriptions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.sem-desc {
    font-size: 0.7rem;
    color: var(--sol-text-secondary, #808090);
    background: var(--sol-bg-elevated, #1e1e2e);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

/* Footer */
.sem-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--sol-border, #3a3a4a);
}

/* Button Styles (inherit from sol-modal-btn) */
.sol-modal-btn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.sol-modal-btn.primary {
    background: var(--sol-accent, #60a5fa);
    color: white;
}

.sol-modal-btn.primary:hover {
    background: #3b82f6;
}

.sol-modal-btn.secondary {
    background: var(--sol-bg-surface, #2a2a3a);
    color: var(--sol-text-primary, #e0e0e0);
    border: 1px solid var(--sol-border, #3a3a4a);
}

.sol-modal-btn.secondary:hover {
    background: var(--sol-bg-elevated, #1e1e2e);
}

.sol-modal-btn.danger {
    background: #ef4444;
    color: white;
}

.sol-modal-btn.danger:hover {
    background: #dc2626;
}

/* Responsive */
@media (max-width: 600px) {
    .sem-modal {
        width: 95%;
        max-height: 90vh;
    }

    .sem-total-value {
        font-size: 2rem;
    }

    .sem-component-descriptions {
        flex-direction: column;
        gap: 0.25rem;
    }
}
