@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
    /* Base Colors */
    --primary-bg: #f5e6e0;        /* Light beige background */
    --secondary-bg: #e8d5cc;      /* Darker beige */
    --white: #ffffff;             /* Pure white */
    --black: #2a2a2a;             /* Dark gray/black */
    
    /* UI Colors */
    --button-primary: #9c8276;    /* Warm brown for buttons */
    --button-hover: #7d665c;      /* Darker brown for hover */
    --error-red: #cb8a8a;         /* Muted red for errors */
    --link-red: #ff0000;          /* Bright red for status */
    --arrow-gray: #666666;        /* Gray for arrows/icons */
    
    /* Overlay Colors */
    --overlay-green: rgba(139, 165, 120, 0.3);  /* Light green overlay */
    --overlay-green-active: rgba(139, 165, 120, 0.5);  /* Darker green overlay */
    --shadow-color: rgba(156, 130, 118, 0.2);   /* Shadow color */
    
    /* Table Colors */
    --table-header-bg: var(--black);
    --table-row-odd: var(--primary-bg);
    --table-row-even: var(--secondary-bg);
    --table-row-hover: #d8c5bc;
}

body {
    font-family: 'Open Sans', Arial, sans-serif; /* Apply globally */
    font-optical-sizing: auto;
    font-weight: 400; /* Default weight */

    background-color: var(--primary-bg);
    margin: 0;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Fonts */


h1, h2, h3 {
    font-family: 'Open Sans', serif;
    font-weight: 700; /* Bold */
    margin: 5px 0px;
}

p, li, span {
    font-family: 'Open Sans', serif;
    font-weight: 400; /* Regular */
}

button, btn, td, th{
    font-family: 'Open Sans', serif;
    font-weight: 600; /* Semi-bold for better emphasis */
}

.flex-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.logo-login {
    width: 300px;
    margin-bottom: 20px;
}

.logo {
    width: 150px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.login-field,
button {
    display: block;
    width: 100%;
    margin: 10px 0;
    padding: 10px;
    border: 1px solid var(--secondary-bg);
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

button {
    background-color: var(--button-primary);
    color: var(--text-light);
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: var(--button-hover);
}

.error-message {
    color: var(--error-red);
    font-size: 0.9rem;
    margin-top: 10px;
    display: none;
}


#layout {
    display: flex;
    width: 100%;
    height: 100vh; /* Full viewport height */
}

#sidebar {
    width: 15%;
    background-color: var(--primary-bg);
    padding: 0px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header section */
.header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Space between logo and icons */
}

.social-icons {
    display: flex;
    gap: 30px; /* Space between icons */
    justify-content: center;
}

.social-icons a img {
    width: 30px; /* Unified size for all icons */
    height: 30px;
    transition: transform 0.3s ease; /* Smooth hover effect */
}

.social-icons a img:hover {
    transform: scale(1.3); /* Slight zoom on hover */
}

/* Footer section */
.footer {
    text-align: center;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
    margin-top: auto; /* Pushes footer to bottom */
    padding: 0px 10px;
}

.divider {
    width: 100%;
    border: none;
    border-top: 1px solid #ccc; /* Light grey separator */
    margin: 10px 0; /* Spacing around the line */
}

/* Logout button styling */
#logoutButton {
    width: 70%;  /* Reduce button width */
    max-width: 200px; /* Optional: Limit maximum width */
    padding: 15px;
    font-size: 1rem;
    background-color: var(--button-primary);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    border-radius: 4px;
    margin: 10px auto 0;  /* Center button horizontally and add top margin */
    display: block; /* Ensures it behaves like a block-level element */
    text-align: center;
    margin-bottom: 10px;
}

#logoutButton:hover {
    background-color: var(--button-hover);
}

#tourButton {
    width: 70%;  /* Reduce button width */
    max-width: 200px; /* Optional: Limit maximum width */
    padding: 15px;
    font-size: 1rem;
    background-color: var(--button-primary);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    border-radius: 4px;
    margin: 10px auto 0;  /* Center button horizontally and add top margin */
    display: block; /* Ensures it behaves like a block-level element */
    text-align: center;
    margin-bottom: 10px;
}

#tourButton:hover {
    background-color: var(--button-hover);
}

#mainContent {
    position: relative;
    width: 85%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden; /* Prevent scrolling */
}

.building-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Base image styling */
.building-base {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}

.building-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.building-overlay {
    position: absolute;
    transition: opacity 0.3s;
    cursor: pointer;
    opacity: 0.3;
    pointer-events: visiblePainted;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Positioning BlockA and BlockB */
.svg-container {
    position: absolute; /* Absolute positioning to layer on top */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Prevent SVGs from blocking interactions with the image */
}

#blockA {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    pointer-events: none; /* Block interactions with Block A */
}

/* Block B should remain interactive */
#blockB {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9998;
    pointer-events: all; /* Allow interactions (hover, click) on Block B */
}

/* Ensure SVG is clickable */
svg path {
    pointer-events: all; /* Allow click events on SVG path */
}

/* Block A's content remains on top visually, but won't block clicks */
svg a {
    position: relative;
    z-index: 1;
}
/*Are apartments reserved or not-togle switch*/
.switch {
    /*--false: #BE4D4D;
    --true: #5A8878;*/
    --false:#5A8878;
    --true:#BE4D4D;
    /**/
   }
   
   input[type=checkbox] {
    appearance: none;
    height: 2rem;
    width: 3.5rem;
    background-color:#d8c5bc;
    position: relative;
    border-radius: .2em;
    cursor: pointer;
   }
   
   input[type=checkbox]::before {
    content: '';
    display: block;
    height: 1.9em;
    width: 1.9em;
    transform: translate(-50%, -50%);
    position: absolute;
    top: 50%;
    left: calc(1.9em/2 + .3em);
    background-color: var(--false);
    border-radius: .2em;
    transition: .3s ease;
   }
   
   input[type=checkbox]:checked::before {
    background-color: var(--true);
    left: calc(100% - (1.9em/2 + .3em));
   }


.apartment-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
}

.apartment-table th,
.apartment-table td {
    border: 1px solid var(--secondary-bg);
    padding: 8px;
    text-align: left;
    font-size: 0.9em;
    border: none;
}

.apartment-table th {
    background-color: var(--accent-brown);
    color: var(--text-light);
    font-weight: bold;
}

.apartment-table td {
    padding: 0px 8px;
}

#apartmentTableBody {
    display: table-row-group;
}

.apartment-table tr:hover {
    background-color: var(--secondary-bg);
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px 0;
    background-color: var(--button-primary);
    color: var(--text-light);
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--button-hover);
}

.content-container {
    display: flex;
    flex-direction: column;
    /* gap: 1rem;
    padding: 1rem; */
}

.row {
    display: flex;
    width: 100%;
}

.column {
    padding: 1rem;
}

.image-slider {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: auto;
    overflow: hidden;
}

.image-slider img {
    width: 100%;
    margin-bottom: 1rem;
    display: none;
}

.image-slider img.active {
    display: block;
}

#image-slider{
    background-color: var(--table-row-hover);
}

#svg-container{
    background-color: var(--table-row-hover);
}

.apartment-table th {
    background-color: var(--table-header-bg);
    color: var(--white);
    font-weight: normal;
    font-size: 1em;
}

.apartment-table tr:hover {
    background-color: var(--table-row-hover);
}

.apartment-table tr:nth-child(odd):hover,
.apartment-table tr:nth-child(even):hover {
    background-color: var(--table-row-hover);
}

.apartment-table tr:nth-child(odd) {
    background-color: var(--table-row-odd);
}

.apartment-table tr:nth-child(even) {
    background-color: var(--table-row-even);
}

.apartment-table .status-reserved,
.apartment-table .status-rented {
    color: var(--link-red);
}

.apartment-table .btn {
    background-color: var(--button-primary);
    color: var(--white);
}

.apartment-table .btn:hover {
    background-color: var(--button-hover);
}

.apartment-table .details-arrow {
    color: var(--arrow-gray);
    font-weight: bold;
}


.description {
    padding: 1rem;
    background-color: var(--primary-bg);
    border-radius: 5px;
    color: var(--text-dark);
}

.dots {
    text-align: center;
    margin: 20px 0;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.dot {
    height: 12px;
    width: 12px;
    background-color: var(--secondary-bg);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot.active {
    background-color: var(--button-hover);
}

.svg-container {
    text-align: center;
    margin: 20px 0;
    position: relative;
    height: 330px;
    max-height: 380px;
    /* overflow: hidden; */
}

.svg-container img {
    width: 300px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.3s ease;
}

/* SVG STYLES */
.cls-1-1 {
    fill: var(--button-primary);;
    opacity: .1;
}
#Layer_2-2 path:hover {
    opacity: 0.5; /* Make the path more visible */
}
.cls-2-1 {
    fill: none;
    display: none;
}

.cls-1 {
    fill:none;
}
.cls-2 {
    fill: var(--button-primary);;
    opacity: .1;
}
.cls-2:hover {
    opacity: 0.5;
}

.footer-tablet{
    display: none;
}

/* MOBILE / TABLET */
@media screen and (max-width: 1024px) {

    h1, h2, h3 {
        font-size: 1.1em;
    }

    p, td {
        font-size: 0.9em;
    }

    body { 
        max-height: 100vh;
        overflow-x: hidden;
    }

    #layout {
        flex-direction: column;
    }

    #sidebar {
        width: 89%;
        height: auto;;
        flex-direction: row;
        padding: 0px 20px;
        align-items: center;
    }

    .header {
        flex-direction: row;
        width: 100%;
        justify-content: space-between;
        align-items: center;
    }

    /* Adjust logo size for tablet */
    .header .logo {
        width: auto;
        height: 70px;
    }

    .social-icons {
        margin: 0;
        gap: 20px;
    }

    .social-icons a img {
        width: 30px;
        height: 30px;
    }

    .footer {
        display: none; /* Hide footer in header area */
    }

    .logout{
        display: none !important;
    }

    #logoutButton {
        margin: 20px auto;
    }

    /* Create new footer below main content */
    #mainContent::after {
        display: block;
        width: 100%;
    }

    /* Footer repositioning */
    .footer-tablet {
        display: block;
        /* width: 100%; */
        text-align: center;
        padding: 0px 15px;
        background-color: var(--primary-bg);
    }
    
    .divider {
        display: none;
    }

    /* Main content adjustments */
    #mainContent {
        width: auto;
        height: 80%;
        /* aspect-ratio: 16/9; */
        margin: 20px 0;
        display: block;
    }

    .building-container {
        width: 143%;
        height: 100%;
        /* position: relative; */
        margin-left: -23%;
    }

    .cls-1-1 {
        fill: var(--button-primary);
        opacity: .3;
    }

    .cls-2{
        fill: var(--button-hover);
        opacity: .3;
    }
 
    .content-container {
        padding: 1rem 0rem;
        width: 100%;
        box-sizing: border-box;
    }

    .content-container .row {
        flex-direction: column;
        /* margin-bottom: 2rem; */
    }

    .content-container .column {
        width: 100% !important;
        padding: 0 0;
    }

    .image-slider {
        max-width: 100%;
        margin-bottom: 0.5rem; /* Reduced margin before dots */
    }

    .image-slider img {
        border-radius: 5%;
    }

    .description {
        border-radius: 5%;
        background-color: var(--secondary-bg);
    }

    .svg-container {
        width: 100%;
        height: 330px;
        /* margin: 1rem 0; */
    }

    #image-slider{
        background-color: var(--primary-bg);
    }
    
    #svg-container{
        background-color: var(--primary-bg);
        margin-top: 0px !important;
    }

    /* Improved table scaling for mobile */
    .apartment-table {
        width: 100%;
        font-size: 14px;
        transform-origin: left top;
    }

    .apartment-table th,
    .apartment-table td {
        padding: 5px 5px;
        font-size: 0.9em;
    }

    .apartment-table td {
        padding: 0px 5px;
    }

    .btn {
        padding: 5px 10px;
        font-size: 0.9em;
    }

    /* Ensure dots are visible on mobile */
    .dots {
        margin: 15px 0;
        padding: 5px 0;
    }
}

/* Smaller mobile devices */
@media screen and (max-width: 480px) {
    .content-container {
        padding: 0.5rem;
    }


    .apartment-table th,
    .apartment-table td {
        padding: 5px 5px;
        font-size: 0.9em;
    }

    .apartment-table td {
        padding: 0px 5px;
    }
}