/**
 * Section Component
 * Generic section/card containers (truly reusable)
 * Replaces page-specific: .settings-section, .content-section, .room-metrics-card, etc.
 */

/* Base Section Container */
.section {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

/* When section-title is NOT in section-header, add bottom margin */
.section-title:not(.section-header .section-title) {
    margin-bottom: 8px;
}

.section-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

/* Section Variants */
.section-compact {
    padding: 16px;
    margin-bottom: 16px;
}

.section-bordered {
    border: 2px solid var(--border-color);
    box-shadow: none;
}

.section-flat {
    background: transparent;
    box-shadow: none;
    padding: 0;
}

/* Section with Actions */
.section-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* Legend/Info Box (can be used for any info section) */
.section-legend {
    background: #f8fafc;
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 20px;
}

.section-legend .legend-title {
    display: block;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.section-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.section-legend .legend-item:last-child {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .section {
        padding: 16px;
        margin-bottom: 16px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .section-actions {
        flex-direction: column;
    }

    .section-legend {
        padding: 12px;
    }
}
