/* ========================================
   3D Isometric Statsionar Scheme Styles
   ======================================== */

/* 3D Scene Container - subtle perspective for depth feel */
.scene-3d {
    perspective: 800px;
    perspective-origin: 50% 20%;
}

/* Building 3D Card */
.building-3d {
    transition: transform 0.4s ease;
}
.building-3d:hover {
    transform: translateY(-2px);
}

/* Floor Layer - each floor is a 3D slab with subtle tilt */
.floor-3d {
    position: relative;
    margin-bottom: 16px;
    transition: all 0.35s ease;
    transform: rotateX(2deg);
    transform-origin: center top;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
}
.floor-3d:hover {
    transform: rotateX(0deg) translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.12), 0 4px 10px rgba(0,0,0,0.06);
    z-index: 10;
}

/* Room 3D Block - clean card with lift effect */
.room-3d {
    position: relative;
    width: 120px;
    min-height: 100px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 2px solid rgba(0,0,0,0.06);
    box-shadow: 0 2px 6px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
}

/* Room shadow ellipse beneath each card */
.room-3d::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 12px;
    right: 12px;
    height: 8px;
    background: rgba(0,0,0,0.06);
    border-radius: 50%;
    z-index: -1;
    transition: all 0.25s ease;
}

.room-3d:hover {
    transform: translateY(-8px) scale(1.06);
    box-shadow: 0 16px 32px rgba(0,0,0,0.13), 0 6px 12px rgba(0,0,0,0.08);
    z-index: 20;
    border-color: rgba(59,130,246,0.3);
}
.room-3d:hover::after {
    bottom: -12px;
    left: 16px;
    right: 16px;
    height: 12px;
    background: rgba(0,0,0,0.1);
}

/* Room status colors */
.room-3d--free {
    background: linear-gradient(145deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
}
.room-3d--free:hover {
    box-shadow: 0 20px 40px rgba(34,197,94,0.25), 0 0 0 4px rgba(34,197,94,0.1);
}

.room-3d--occupied {
    background: linear-gradient(145deg, #fee2e2 0%, #fecaca 100%);
    border-color: #fca5a5;
}
.room-3d--occupied:hover {
    box-shadow: 0 20px 40px rgba(239,68,68,0.25), 0 0 0 4px rgba(239,68,68,0.1);
}

.room-3d--cleaning {
    background: linear-gradient(145deg, #fef9c3 0%, #fef08a 100%);
    border-color: #fde047;
}

.room-3d--maintenance {
    background: linear-gradient(145deg, #f3f4f6 0%, #e5e7eb 100%);
    border-color: #d1d5db;
}

/* VIP Room special styling */
.room-3d--vip {
    border-width: 3px;
    animation: vipGlow 2s ease-in-out infinite;
}
.room-3d--vip.room-3d--free {
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}
.room-3d--vip.room-3d--occupied {
    background: linear-gradient(145deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

@keyframes vipGlow {
    0%, 100% { box-shadow: 0 0 8px rgba(245,158,11,0.3); }
    50% { box-shadow: 0 0 20px rgba(245,158,11,0.6), 0 0 40px rgba(245,158,11,0.2); }
}

/* VIP Crown badge */
.vip-badge-3d {
    position: absolute;
    top: -14px;
    right: -8px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 10px rgba(245,158,11,0.4);
    z-index: 30;
    animation: vipBadgePulse 1.5s ease-in-out infinite;
}
@keyframes vipBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Status dot */
.status-dot-3d {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px currentColor;
}
.status-dot-3d--free { background: #22c55e; color: #22c55e; }
.status-dot-3d--occupied { background: #ef4444; color: #ef4444; animation: pulseDot 1s ease-in-out infinite; }
.status-dot-3d--cleaning { background: #eab308; color: #eab308; }
.status-dot-3d--maintenance { background: #9ca3af; color: #9ca3af; }

@keyframes pulseDot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.6); }
    50% { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
}

/* Building header */
.building-header-3d {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: white;
    border-radius: 14px 14px 0 0;
}

/* Modal backdrop for room click */
.room-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}
.room-modal {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: modalSlideUp 0.3s ease-out;
}
@keyframes modalSlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Room grid - flex-wrap layout with no tilt (clean & visible) */
.iso-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px 8px;
    justify-content: flex-start;
    align-items: stretch;
}

/* 3D Toggle Switch */
.view-toggle {
    display: inline-flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 3px;
}
.view-toggle button {
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #64748b;
}
.view-toggle button.active {
    background: white;
    color: #1e293b;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Patient name on occupied room */
.room-patient-3d {
    font-size: 0.65rem;
    color: #dc2626;
    font-weight: 600;
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
}

/* Empty floor placeholder */
.floor-empty-3d {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 80px;
    color: #94a3b8;
    font-size: 0.8rem;
    border: 2px dashed #e2e8f0;
    border-radius: 10px;
    width: 100%;
}
