/* Room Minimum Size Calculator Specific Styles */

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background-color: var(--background-light);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.checkbox-item:hover {
    background-color: var(--border-color);
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
}

/* Space Breakdown Chart */
.space-breakdown {
    margin-bottom: 24px;
}

.space-breakdown h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.breakdown-chart {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    min-height: 200px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.breakdown-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.breakdown-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.breakdown-bar {
    width: 100%;
    height: 20px;
    background-color: var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 16px;
    display: flex;
}

.breakdown-segment {
    height: 100%;
    transition: width 0.3s ease;
}

.segment-mattress {
    background-color: var(--primary-color);
}

.segment-clearance {
    background-color: var(--accent-color);
}

.segment-furniture {
    background-color: #f59e0b;
}

.segment-door {
    background-color: #ef4444;
}

/* Compliance Check */
.compliance-check {
    margin-bottom: 24px;
}

.compliance-check h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.compliance-item {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.compliance-item.pass {
    border-color: var(--accent-color);
    background-color: #f0fdf4;
}

.compliance-item.fail {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.compliance-item.warning {
    border-color: #f59e0b;
    background-color: #fffbeb;
}

.compliance-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    flex-shrink: 0;
}

.compliance-icon.pass {
    background-color: var(--accent-color);
}

.compliance-icon.fail {
    background-color: #ef4444;
}

.compliance-icon.warning {
    background-color: #f59e0b;
}

.compliance-content {
    flex: 1;
}

.compliance-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.compliance-description {
    font-size: 11px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Room Visualization */
.room-visualization {
    background-color: var(--background-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-top: 16px;
}

.room-diagram {
    width: 100%;
    height: 300px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background-color: var(--background-light);
    position: relative;
    overflow: hidden;
}

.room-element {
    position: absolute;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-align: center;
}

.room-mattress {
    background-color: var(--primary-color);
    opacity: 0.8;
}

.room-furniture {
    background-color: #f59e0b;
    opacity: 0.7;
}

.room-clearance {
    background-color: var(--accent-color);
    opacity: 0.3;
    border: 1px dashed var(--accent-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .breakdown-chart {
        padding: 16px;
    }
    
    .compliance-grid {
        grid-template-columns: 1fr;
    }
    
    .room-diagram {
        height: 250px;
    }
    
    .breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Animation for breakdown chart */
@keyframes slideIn {
    from {
        width: 0;
    }
    to {
        width: var(--target-width);
    }
}

.breakdown-segment {
    animation: slideIn 0.8s ease-out forwards;
}

/* Tooltip enhancements for this calculator */
.tooltip:hover::after {
    max-width: 200px;
    white-space: normal;
}

/* Print styles */
@media print {
    .breakdown-chart,
    .compliance-grid,
    .room-visualization {
        break-inside: avoid;
    }
    
    .compliance-item {
        border: 1px solid #ccc !important;
        background-color: white !important;
    }
    
    .breakdown-segment {
        border: 1px solid #ccc;
    }
}
