body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    padding: 0;
    background-size: cover;
    background-color: #f4f4f9; /* Soft gray */
}

.left-panel, #seating-assignment-container {
width: 0px; /* Wider columns */
padding: 1px;
background-color: #e0f7fa; /* Consistent background color */
border: 2px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
position: relative;
z-index: 5; /* Ensure proper stacking */
transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
overflow: hidden;
}


.main-content {
flex: 3; /* Allow the main section to take up proportional space */
max-width: 100%; /* Ensure it doesnÃ¢â‚¬â„¢t shrink */
background-color: #fff;
padding: 20px;
border: 2px solid #ccc;
border-radius: 5px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add depth */
margin: 0; /* Remove auto margins since flexbox handles alignment */
position: relative;
z-index: 10; /* Ensure it stays on top */
height: 100%;
}

.left-panel {
    background-color: transparent !important;
    max-height: 0px !important;
    border: transparent !important;
    
}

#room-container {
position: relative;
background-color: transparent; /* Ensure no default background conflicts */
transition: background-color 0.3s ease;
width: 300px;
height: 300px;
background-color: #fff;

overflow: visible; /* Ensure draggable dots remain accessible */
display: flex;
align-items: center;
justify-content: center;
margin: 20px auto; /* Center the room */
margin-left: 0px; /* Avoid overlapping the left panel */

padding: 0; /* Fix: Remove extra padding */
z-index: 1; /* Ensure it's not hidden by other elements */
margin: 20px auto; /* Center horizontally within the main content */
display: flex;
}

.dimension-container {
display: flex;
justify-content: center;
gap: 10px;
margin-bottom: 20px; /* Add spacing from room container */
align-items: center;
}


.dimension-container button {
display: block;
margin: 0 auto; /* Center the button */
}



.room-container {
position: relative;
width: 800px;
height: 800px;
background-color: #fff;

overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
margin: 20px;

z-index: 1; /* Ensure it's not hidden by other elements */
gap: 20px;
}

/* Buttons */
button {
    width: 100%;
    margin: 5px 0;
    padding: 10px;
    font-size: 1em;
    cursor: pointer;
}

/* Dropdown Styling */
.dropdown {
    position: relative;
    display: block;
}

.dropbtn {
    background-color: blueviolet;
    color: white;
    padding: 10px;
    font-size: 16px;
    border: none;
    width: 100%; /* Ensure dropdown button matches other buttons */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 100%;
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 500;
    width: 300px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    padding: 12px;
    text-decoration: none;
    display: block;
    color: black;
}

.dropdown-content a:hover {
    background-color: #f1f1f1;
}




.hardwood-dark {
background-image: url('roomlayoutassets/istockphoto-905636222-612x612.jpg');
background-size: cover;
background-position: center;
background-color: transparent; /* Ensure transparency */
}

.hardwood-light {
background-image: url('roomlayoutassets/junckers-grading-ash-harmony.jpg');
background-size: cover;
background-position: center;
background-color: transparent;
}

.tile-floor {
background-image: url('roomlayoutassets/istockphoto-1358663231-612x612.jpg');
background-size: cover;
background-position: center;
background-color: transparent;
}

.grass {
background-image: url('roomlayoutassets/360_F_268144793_TJmAFcxcovG3DOhBcCBIUyZhBMJoIXsc.jpg');
background-size: cover;
background-position: center;
background-color: transparent;
}

    #room-svg {
        background: transparent;
        pointer-events: auto; /* Enable interaction */
        width: 100%; /* Ensure responsiveness */
        height: 100%; /* Adjust as necessary */
    
    
}


/* Layout Structure */
.container {
    display: flex;
    gap: 20px; /* Add consistent spacing between sections */
    align-items: flex-start; /* Align all sections to the top */
    justify-content: space-between;
    padding: 20px;
    flex-direction: row;
       }



/* Header Styling */
header {
    text-align: center;
    font-size: 2.5em;
    font-weight: bold;
    padding: 20px;
    background-color: blueviolet;
    color: white;
    border-bottom: 5px solid #333;
    margin-top: 20px;
}









.main-content {
    background-color: #fff; /* White */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Controls */
.controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 80vw;
    gap: 15px;
}

button {
    padding: 10px 20px;
    margin: 5px 0;
    border: none;
    cursor: pointer;
    font-size: 1em;
    background-color: blueviolet;
    color: white;
    border-radius: 5px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: blueviolet;
}


/* Left and Right Tool Panels */


/* Table Styling */
.table-wrapper {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    z-index: 1000;
}

.table {
    width: 60px;
    height: 30px;
    border: 5px solid #333;
    background-color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    pointer-events: auto;
    cursor: pointer;
    z-index: 1000;
}

.table.round {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    z-index: 1000;
}

.table-label {
    font-size: 12px;
    text-align: center;
    z-index: 1000;
}

/* Chair Styling */
.chair {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: #808080;
    border-radius: 50%;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    cursor: grab;
    touch-action: none;
    z-index: 10;
}

.chair::before {
    content: "";
    position: absolute;
    top: -4px;
    width: 12px;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
}

/* Door Styling */
.door {
    position: absolute;
    width: 60px;
    height: 10px ;
    background-color: #8b4513;
    border: 2px solid #654321;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Window Styling */
.window {
    position: absolute;
    width: 36px;
    height: 10px;
    background-color: #87ceeb;
    border: 2px solid #4682b4;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8em;
    display: none;
    pointer-events: none;
    z-index: 100;
}

/* Proximity Boundary */
.proximity-boundary {
    position: absolute;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    width: calc(100% + 40px);
    height: calc(100% + 40px);
    left: -20px;
    top: -20px;
    pointer-events: none;
}

.proximity-boundary.hidden {
    display: none;
}

/* Highlighting Selected Table */
.highlighted-table {
    border: 2px solid blueviolet;
    background-color: rgba(76, 175, 80, 0.1);
    z-index: 1000;
}

/* Seating Chart */
.seating-chart {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

#name-input {
    padding: 5px;
    font-size: 1em;
}




#table-assignment-list {
    list-style-type: none; /* Remove bullets */
    padding: 0; /* No extra padding */
    margin: 0; /* No extra margin */
    word-wrap: break-word; /* Force long words to wrap */
    overflow-wrap: break-word; /* Support for older browsers */
    white-space: normal; /* Allow wrapping */
}

#table-assignment-list li {
    margin-bottom: 5px; /* Add spacing between list items */
    word-wrap: break-word; /* Ensure words wrap correctly */
    overflow-wrap: break-word; /* Force wrapping for long text */
    white-space: normal; /* Allow proper line breaks */
}

#parent-container {
    display: flex; /* Use Flexbox for layout */
    flex-direction: row; /* Arrange child elements horizontally */
    gap: 10px; /* Add spacing between sections */
}

#seating-assignment-container {
    width: 300px; /* Same width as the left panel */
    padding: 15px; /* Ensure consistent padding */
    background-color: #e0f7fa;
    border: 2px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    position: relative;
    z-index: 5;
    margin: 0; /* Ensure no extra top margin */
    transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
    overflow: hidden;
    min-width: 0 !important; /* Force width to shrink */
    min-height: 0 !important; /* Force height to shrink */
    max-width: none !important; /* Remove any maximum width restrictions */
    max-height: none !important; /* Remove any maximum height restrictions */
}






.panel-toggle {
    position: absolute;
    top: 10px;
    right: 10px; /* Place in the corner */
    width: 25px;
    height: 25px;
    background-color: transparent !important;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 10;
}

.panel-toggle:hover {
    background-color: #555;
}





/* Rotation Controls */
.rotation-controls {
    position: absolute;
    top: -30px;
    display: flex;
    gap: 5px;
    z-index: 10;
}

.rotation-button {
    padding: 3px 5px;
    cursor: pointer;
}

/* Shared Styling for Interactable Elements */
.table, .chair, .door, .window {
    cursor: grab;
    touch-action: none;
    z-index: 1000;
}

.table:active, .chair:active, .door:active, .window:active {
    cursor: grabbing;
    z-index: 1000;
}





#room-svg {
    width: 100%;
    height: 100%;
    
    overflow: visible; /* Ensure visibility of extended nodes */
}


.node-handle {
    fill: blue;
    stroke: black;
    stroke-width: 1px;
    cursor: grab !important; /* Force the grab cursor */
   
}

.node-handle:active {
    cursor: grabbing !important; /* Change to grabbing on drag */
}

.node-handle {
    z-index: 10; /* Ensure dots stay on top of everything */
}

.node-handle {
    pointer-events: all !important; /* Ensure interaction */
}


@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#right-panel-arrow {
    animation: blink 1s infinite;
} 








/* Hide the full panel when collapsed */
#left-panel.collapsed,
#seating-assignment-container.collapsed {
    display: none;
}

.right-panel{
    width: 300px ;
}

/* Left and Right Panels */
.left-panel, .right-panel {
     /* Ensure consistent width */
    padding: 15px;
    padding-top: 50px !important;
    background-color: #e0f7fa; /* Soft teal for visual consistency */
    border: 2px solid #ccc;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: absolute;
    top: -50px;
    background-color: #e0f7fa; /* Soft teal */
    box-sizing: border-box;
    position: relative;
    z-index: 5; /* Lower z-index to avoid overlap */
    flex: 0 0 auto; /* Prevents layout constraints */
    z-index: 900;
    height: auto !important;
}







#left-collapsed-wrapper {
    top: 10px; /* Adjust as needed */
    left: 10px;
    z-index: 1000;
    
}

#right-collapsed-wrapper {
    top: 10px;
    right: 10px;
    z-index: 1000;
}

.collapsed-wrapper {
    position: fixed;
    width: 30px;
    height: 30px;
    z-index: 15;
}


.collapsed-box {
    position: fixed; /* Ensures itÃ¢â‚¬â„¢s independent of parent containers */
    width: 30px;
    height: 30px;
    background-color: #333;
    color: white;
    display: none; /* Shown only when toggled */
    justify-content: center;
    align-items: center;
    border: 10px solid red;
    border-radius: 4px;
    z-index: 2000; /* Ensure it's above all other elements */
    cursor: pointer;
    pointer-events: auto; /* Ensure clicks are registered */
}

/* Left Collapsed Box */
#left-collapsed-box {
    left: 10px;
    top: 10px; /* Move to the top */
    transform: none; /* Remove centering transform */
}

/* Right Collapsed Box */
#right-collapsed-box {
    right: 10px;
    top: 10px; /* Move to the top */
    transform: none; /* Remove centering transform */
}

.right-panel, #seating-assignment-container {
    max-height: 1000px; /* Enforce the height limit */
    overflow-y: auto;   /* Enable vertical scrolling */
}
#seating-assignment-container {
    max-height: 1000px !important;
    overflow-y: auto !important;
}

.chair {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: rgba(255, 0, 0, 0.2);
    border: 1px solid rgb(92, 71, 71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-origin: center center;
    transform: rotate(var(--rotation-angle, 0deg)); /* Default rotation is 0 */
    z-index: 10;
}

.chair::before {
    content: '';
    position: absolute;
    top: -4px;
    width: 12px;
    height: 4px;
    background-color: #333;
    border-radius: 2px;
    transform-origin: center;
}
