/* 입주정보 섹션 스타일 */

.accommodation-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    justify-content: center;
}

.accommodation-tab {
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--olive-color);
    background-color: white;
    color: var(--olive-color);
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.accommodation-tab:hover {
    background-color: var(--olive-color);
    color: white;
}

.accommodation-tab.active {
    background-color: var(--olive-color);
    color: white;
}

/* 건물 구조 시각화 */
.building-structure {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    margin-bottom: 2rem;
}

.floor-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.floor-label {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--olive-color);
    margin-bottom: 0.5rem;
}

.floor-units {
    display: flex;
    justify-content: center;
    gap: 2rem;
    width: 100%;
    flex-wrap: wrap;
}

/* 호실 카드 */
.unit-building {
    background-color: white;
    border: 3px solid var(--olive-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 500px;
    transition: all 0.3s ease;
}

.unit-building:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.unit-header {
    text-align: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--olive-color);
}

.unit-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--olive-color);
}

.rooms-flex {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.room-cell {
    aspect-ratio: 1.2;
    border: 2px solid #ddd;
    border-radius: 0.375rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0.5rem;
    background-color: white;
}

.room-cell.available {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #28a745;
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.2);
}

.room-cell.available:hover {
    background: linear-gradient(135deg, #c3e6cb 0%, #b3debb 100%);
    transform: scale(1.08);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.4);
}

.room-cell.occupied {
    background-color: #d6d8db;
    color: #383d41;
    border-color: #6c757d;
    cursor: not-allowed;
}

.room-cell.reserved {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffc107;
    cursor: not-allowed;
}

.room-cell.maintenance {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #dc3545;
    cursor: not-allowed;
}

.room-number {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.room-status {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* 모달 스타일 */
.modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.modal-backdrop.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 0.5rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--olive-color);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6c757d;
}

.modal-body {
    padding: 1.5rem;
}

.room-details {
    margin-bottom: 1.5rem;
}

.room-details-info {
    background-color: #f9f9f9;
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.room-details-info p {
    margin: 0.5rem 0;
    display: flex;
    justify-content: space-between;
}

.facilities-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.facility-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background-color: #e8f5e9;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #2e7d32;
}

.facility-item i {
    font-size: 1.25rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.btn-apply {
    background-color: var(--olive-color);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-apply:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

/* 상태 범례 */
.legend {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 0.375rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.legend-color {
    width: 24px;
    height: 24px;
    border-radius: 0.25rem;
    border: 1px solid #ddd;
}

/* 반응형 디자인 */
@media (max-width: 1200px) {
    .floor-units {
        gap: 1.5rem;
    }

    .unit-building {
        min-width: 450px;
    }
}

@media (max-width: 768px) {
    .floor-units {
        flex-direction: column;
        align-items: center;
    }

    .unit-building {
        width: 100%;
        max-width: 600px;
    }

    .rooms-flex {
        grid-template-columns: repeat(4, 1fr);
    }

    .accommodation-tabs {
        flex-wrap: wrap;
    }

    .accommodation-tab {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .unit-building {
        min-width: 100%;
        max-width: 100%;
        padding: 1rem;
    }

    .rooms-flex {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .room-cell {
        font-size: 0.7rem;
    }

    .room-number {
        font-size: 0.9rem;
    }

    .unit-number {
        font-size: 0.95rem;
    }
}

/* 건물 배경 장식 */
.building-container {
    position: relative;
    background: linear-gradient(180deg, #f5f5f5 0%, #ffffff 100%);
    padding: 2rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

/* 층 분리선 */
.floor-separator {
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--olive-color) 50%, transparent 100%);
    margin: 1.5rem 0;
}
