/* ========================================
   Reset and Base Styles
   ======================================== */
body, html {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;
}

/* ========================================
   Layout Structure
   ======================================== */
.app-container {
    display: flex;
    height: 100%;
    width: 100%;
}

/* ========================================
   Map Section (Main Content Area)
   ======================================== */
.map-section {
    flex: 3;
    height: 100vh;
    display: flex;
    padding: 0;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e2e8f0 100%);
}

.map-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.floor-plan {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* ========================================
   Integrated Floor Selector (from selector.html)
   ======================================== */
.wrapper {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 147px;
    max-width: 19vw;
    aspect-ratio: 250 / 575;
    z-index: 12;
}

.container {
    position: relative;
    width: 100%;
    height: 100%;
}

.main-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.floor-button {
    position: absolute;
    width: 36%;
    height: 15.65%;
    border: none;
    background: none;
    cursor: pointer;
    padding: 0;
    border-radius: 50%;
    transition: opacity 0.2s, transform 0.2s, box-shadow 0.2s;
    opacity: 0.8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.floor-button svg {
    width: 100%;
    height: 100%;
}

.floor-button:hover { 
    opacity: 1; 
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

.floor-button.selected { opacity: 1; }

.selector {
    position: absolute;
    left: -6%;
    width: 112%;
    height: 19.13%;
    pointer-events: none;
    transition: top 0.5s ease-in-out;
    opacity: 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.selector svg { width: 100%; height: 100%; }

.selector.visible { opacity: 1; }

/* Left side buttons */
.btn-left-0 { left: 2%; top: 83.48%; }
.btn-left-1 { left: 2%; top: 66.09%; }
.btn-left-2 { left: 2%; top: 48.7%; }
.btn-left-3 { left: 2%; top: 31.3%; }

/* Right side buttons */
.btn-right-1 { left: 62%; top: 66.09%; }
.btn-right-2 { left: 62%; top: 48.7%; }
.btn-right-3 { left: 62%; top: 31.3%; }
.btn-right-4 { left: 62%; top: 13.91%; }

/* ========================================
   Sidebar (Rooms List)
   ======================================== */
.sidebar {
    flex: 1;
    background-color: #606060;
    color: white;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    background-color: #868686;
    border-bottom: 1px solid #D9D9D9;
    padding: 20px;
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h2 {
    margin: 0;
    text-align: center;
    flex: 1;
}

.back-button {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ========================================
   Search Container
   ======================================== */
.search-container {
    background-color: #868686;
    border-bottom: 1px solid #D9D9D9;
    padding: 15px;
    display: flex;
    gap: 10px;
    position: relative;
}

.search-input {
    flex: 1;
    background-color: #D9D9D9;
    border: 1px solid #B0B0B0;
    border-radius: 20px;
    padding: 10px 15px;
    color: #333;
    outline: none;
    font-size: 0.9em;
    transition: border-color 0.3s ease;
}

.search-input:focus {
    border-color: #3498db;
}

.search-input::placeholder {
    color: #666;
}

.filters-toggle {
    background: none;
    border: 1px solid #D9D9D9;
    color: #D9D9D9;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    transition: background-color 0.2s ease;
}

.filters-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========================================
   Filters Container
   ======================================== */
.filters-container {
    background-color: #868686;
    border-bottom: 1px solid #D9D9D9;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-select {
    background-color: #D9D9D9;
    border: 1px solid #B0B0B0;
    border-radius: 4px;
    padding: 8px 12px;
    color: #333;
    outline: none;
    font-size: 0.9em;
    width: 100%;
}

.features-filter {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.features-filter label {
    font-weight: bold;
    color: white;
    font-size: 0.9em;
}

#features-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.feature-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    color: white;
    font-size: 0.8em;
}

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

.reset-filters {
    background-color: #D9D9D9;
    border: 1px solid #B0B0B0;
    border-radius: 4px;
    padding: 8px 12px;
    color: #333;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.2s ease;
    width: 100%;
}

.reset-filters:hover {
    background-color: #C0C0C0;
}

/* ========================================
   Rooms List
   ======================================== */
.rooms-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background-color: #606060;
}

.room-item {
    background-color: #D9D9D9;
    padding: 15px;
    margin-bottom: 5px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
    color: #333;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.room-item:hover {
    background-color: #C0C0C0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.room-item.is-selected {
    background-color: #3498db;
    color: white;
    font-weight: bold;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.rooms-container::-webkit-scrollbar {
    width: 8px;
}

.rooms-container::-webkit-scrollbar-track {
    background: #222;
}

.rooms-container::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

.rooms-container::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.room-details-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background-color: #606060;
    color: white;
}

.room-details-container h3 {
    margin-top: 0;
    color: #D9D9D9;
}

.room-details-container p {
    margin: 15px 0;
    line-height: 1.5;
}

.room-details-container strong {
    color: #D9D9D9;
}

/* Status indicator */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.open {
    background-color: #28a745;
}

.status-indicator.closed {
    background-color: #dc3545;
}
