/* Biophilic Luxury Theme - No Sidebar Layout */

/* --- Base Styles & Color Palette --- */
:root {
    --bg-color: rgba(15, 52, 39, 0.05); /* A very light, clean grey */
    --text-primary: #212529; /* Darker, more readable text */
    --text-secondary: #0f3427; /* Softer secondary text */
    --border-color: #dee2e6;
    /* The new accent color is set dynamically from config.js */
    --accent-color: #0f3427;
    --accent-color-light: rgba(15, 52, 39, 0.1);
    --accent-color-hover: rgba(15, 52, 39, 0.05);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    #app-header {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    #floor-buttons-container {
        flex-direction: column; /* Stack park groups vertically */
        align-items: stretch;   /* Make groups take full-width */
        gap: 1rem;            /* Space between vertical groups */
    }

    #main-content {
        padding: 1rem;
    }

    .park-title {
        font-size: 0.75rem;
    }

    .floor-button {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
}

/* --- Main App Layout --- */
#app-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

/* --- App Header --- */
#app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
	align-items: stretch;
	flex-direction: row;
	align-content: normal;
	justify-content: center;
	background-color:#0f3427;
}

#project-title {
    font-family: var(--font-heading);
    font-size: 1.75rem; /* Slightly larger for heading font */
    font-weight: 700;
}

#floor-navigation {
    display: flex;
    align-items: center;
}

#floor-buttons-container {
    display: flex;
    flex-wrap: wrap; /* Allow groups to wrap on smaller screens */
    gap: 1.5rem; /* Space between park groups */
    justify-content: center; /* Center the groups */
    padding: 0.5rem 1rem;
}

.park-group {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid transparent;
    background-color: transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.park-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f0f0f0; /* Changed to light gray for visibility on dark header */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem; /* Add space between title and buttons */
}

.floor-buttons {
    display: flex;
    background-color: rgba(245, 242, 235, 0.8); /* Slightly more transparent */
    border-radius: 99px;
    padding: 0.4rem;
    transition: background-color 0.3s ease;
}

/* Style for the active park group */
.park-group.active {
    background-color: rgba(255, 255, 255, 0.07); /* A subtle, glassy highlight */
    border-color: rgba(255, 255, 255, 0.15);
}

.park-group.active .park-title {
    font-weight: 700;
    color: #fff; /* Brighter white for active state */
}

.park-group.active .floor-buttons {
    background-color: #F5F2EB; /* Fully opaque when active */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.floor-button {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    background-color: transparent;
    border: none;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.floor-button:hover {
    color: var(--text-primary);
    background-color: var(--accent-color-hover);
}

.floor-button.active {
    color: var(--text-primary);
    font-weight: 600;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* --- Main Content Area --- */
#main-content {
    flex-grow: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    overflow: hidden;
}

#floor-plan-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 30;
    transition: opacity 0.4s ease;
}

#loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid var(--border-color);
    border-top-color: var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#floor-plan-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    z-index: 1;
}

/* --- Units & Tooltip --- */
#units-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

/* Base style for all unit areas */
.unit-area {
    position: absolute;
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: all;
    border-radius: 4px; /* Slightly rounded corners */
    /* Add a subtle but clear default border to all interactive areas */
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Styling for AVAILABLE units */
.unit-area.available {
    background-color: rgba(15, 52, 39, 0.2); /* Use accent color with low opacity */
    border: 1.5px solid rgba(15, 52, 39, 0.6);
}
.unit-area.available:hover {
    background-color: rgba(15, 52, 39, 0.4);
    border-color: #0f3427;
    transform: scale(1.03);
}

/* Styling for SOLD units */
.unit-area.sold {
    background-color: rgba(108, 117, 125, 0.3); /* Greyed out */
    border: 1.5px dashed rgba(108, 117, 125, 0.5);
    cursor: not-allowed;
}

/* Styling for HELD units */
.unit-area.held {
    background-color: rgba(255, 193, 7, 0.3); /* Amber/yellow color */
    border: 1.5px solid rgba(255, 193, 7, 0.7);
}
.unit-area.held:hover {
    background-color: rgba(255, 193, 7, 0.5);
    border-color: #ffc107;
    transform: scale(1.03);
}

/* The 'active' class (on click) makes the unit stand out */
.unit-area.active {
    background-color: rgba(15, 52, 39, 0.5); /* Stronger accent color */
    border: 2px solid #0f3427;
    transform: scale(1.05);
    z-index: 20; /* Bring to front */
}

/* --- Tooltip Styles (Refined) --- */
#tooltip {
    position: fixed;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
    transform: scale(0.95);
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 280px; /* Reduced max-width for a sleeker look */
}

#tooltip.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

/* Simple hover tooltip: Dark and discreet */
#tooltip:not(.detailed) {
    padding: 0.5rem 0.8rem;
    background-color: rgba(20, 20, 20, 0.85);
    color: #fff;
    border-radius: 6px;
}

/* Detailed click tooltip: Bright, glassy, and elegant */
#tooltip.detailed {
    padding: 1rem;
    background-color: rgba(252, 251, 248, 0.75); /* Semi-transparent light background */
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(200, 200, 200, 0.3);
    border-radius: 12px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.unit-details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--accent-color-light);
    margin-bottom: 0.7rem;
}

.unit-details-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem; /* Slightly more space */
}

.unit-details-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unit-details-row-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.unit-details-icon {
    width: 16px; /* Smaller, more refined icons */
    height: 16px;
    stroke: var(--accent-color);
    stroke-width: 1.5;
    opacity: 0.9;
}

.unit-details-label {
    color: var(--text-secondary);
}

.unit-details-value {
    font-weight: 500;
    margin-left: 0.5rem;
    color: var(--text-primary);
}
