/* Walkway Width Calculator Specific Styles */

.walkway-visualization {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    margin: 20px 0;
    min-height: 300px;
    position: relative;
    overflow: hidden;
}

.room-diagram {
    position: relative;
    width: 100%;
    height: 280px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    margin: 0 auto;
}

.diagram-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(to right, #f1f5f9 1px, transparent 1px),
        linear-gradient(to bottom, #f1f5f9 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.5;
}

.bed-element {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 80px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: 2px solid #065f46;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.walkway-zone {
    position: absolute;
    background: rgba(37, 99, 235, 0.1);
    border: 2px dashed #2563eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #1e40af;
    text-align: center;
    line-height: 1.2;
}

.walkway-zone.left {
    left: 10%;
    top: 35%;
    width: 25%;
    height: 30%;
}

.walkway-zone.right {
    right: 10%;
    top: 35%;
    width: 25%;
    height: 30%;
}

.walkway-zone.foot {
    left: 35%;
    bottom: 15%;
    width: 30%;
    height: 20%;
}

.walkway-zone.optimal {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #065f46;
}

.walkway-zone.adequate {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #92400e;
}

.walkway-zone.insufficient {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #dc2626;
}

.width-analysis {
    margin: 32px 0;
}

.width-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.width-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.width-card:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.width-card.optimal {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

.width-card.adequate {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.width-card.insufficient {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.width-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.width-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.width-card.optimal .width-icon {
    background: #10b981;
}

.width-card.adequate .width-icon {
    background: #f59e0b;
}

.width-card.insufficient .width-icon {
    background: #ef4444;
}

.width-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

.width-measurement {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Roboto Mono', monospace;
}

.width-card.optimal .width-measurement {
    color: #065f46;
}

.width-card.adequate .width-measurement {
    color: #92400e;
}

.width-card.insufficient .width-measurement {
    color: #dc2626;
}

.width-description {
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 12px;
}

.width-recommendation {
    padding: 8px 12px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    font-size: 12px;
    color: #1e40af;
    font-weight: 500;
}

.clearance-requirements {
    margin: 32px 0;
}

.clearance-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.clearance-item {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.2s ease;
}

.clearance-item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.clearance-item.priority-high {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
}

.clearance-item.priority-medium {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
}

.clearance-item.priority-low {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
}

.clearance-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.clearance-priority {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clearance-item.priority-high .clearance-priority {
    background: #ef4444;
    color: white;
}

.clearance-item.priority-medium .clearance-priority {
    background: #f59e0b;
    color: white;
}

.clearance-item.priority-low .clearance-priority {
    background: #10b981;
    color: white;
}

.clearance-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.clearance-description {
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 12px;
}

.clearance-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.clearance-action {
    padding: 6px 12px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 12px;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
}

.clearance-action:hover {
    background: #e2e8f0;
    border-color: #2563eb;
    color: #2563eb;
}

.width-standards {
    space-y: 16px;
}

.standard-item {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 12px;
}

.standard-item strong {
    display: block;
    color: #1e293b;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.standard-item p {
    color: #64748b;
    font-size: 13px;
    line-height: 1.3;
    margin: 0;
}

.mobility-guide {
    space-y: 12px;
}

.mobility-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.mobility-item i {
    width: 20px;
    color: #2563eb;
    font-size: 16px;
}

.mobility-item span {
    font-weight: 500;
    color: #374151;
    font-size: 13px;
    font-family: 'Roboto Mono', monospace;
}

.issue-tips {
    space-y: 12px;
}

.tip-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 8px;
}

.tip-problem {
    font-weight: 500;
    color: #ef4444;
    font-size: 13px;
}

.tip-solution {
    font-weight: 600;
    color: #10b981;
    font-size: 12px;
    font-family: 'Roboto Mono', monospace;
}

/* Responsive Design */
@media (max-width: 768px) {
    .walkway-visualization {
        padding: 16px;
        min-height: 250px;
    }
    
    .room-diagram {
        height: 220px;
    }
    
    .bed-element {
        width: 80px;
        height: 60px;
        font-size: 10px;
    }
    
    .walkway-zone {
        font-size: 10px;
    }
    
    .width-grid {
        grid-template-columns: 1fr;
    }
    
    .clearance-actions {
        flex-direction: column;
    }
    
    .tip-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .walkway-visualization {
        padding: 12px;
        min-height: 200px;
    }
    
    .room-diagram {
        height: 180px;
    }
    
    .bed-element {
        width: 60px;
        height: 45px;
        font-size: 9px;
    }
    
    .walkway-zone {
        font-size: 9px;
    }
    
    .width-measurement {
        font-size: 20px;
    }
    
    .standard-item,
    .mobility-item,
    .tip-item {
        padding: 8px;
    }
}

/* Animation for walkway reveal */
@keyframes walkwayReveal {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.walkway-visualization.animate {
    animation: walkwayReveal 0.6s ease-out;
}

.walkway-zone.animate {
    animation: walkwayReveal 0.4s ease-out;
}

/* Loading states */
.walkway-visualization.loading {
    opacity: 0.6;
    pointer-events: none;
}

.walkway-visualization.loading::after {
    content: "Calculating walkway widths...";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 16px 24px;
    border-radius: 8px;
    font-weight: 500;
    color: #374151;
    z-index: 100;
}
