/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Tomas Ridilenir
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/


body {
    overflow-x: hidden; /* Standard practice for scroll animations */
}

@media (max-width: 990px) {
    body {
        opacity: 0;
        animation: mobilePageFade 0.8s ease-out forwards;
    }

    @keyframes mobilePageFade {
        from { opacity: 0; }
        to { opacity: 1; }
    }
}

[id] {
    scroll-margin-top: 100px; /* Adjust this to match your header height */
}

/* Start by making the element invisible by default */
.hero-section {
    opacity: 0;
}

/* Only trigger the animation on screens wider than 990px */
@media (min-width: 991px) {
    .hero-section {
        animation: fadeInDesktop 1s ease-in-out forwards;
        animation-delay: 1.2s;
    }
}

/* Define the animation */
@keyframes fadeInDesktop {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* For mobile/tablet, force it to be visible immediately (no animation) */
@media (max-width: 990px) {
    .hero-section {
        opacity: 1;
    }
}

/* Apply the animation to the mobile-h1 class */
.mobile-h1 {
    opacity: 0;
    /* Move the element up by 20px initially */
    transform: translateY(-20px);
    /* Trigger the animation */
    animation: fadeSlideDown 1s ease-out forwards;
    animation-delay: 1.2s;
}

/* Keyframes for the combined Fade and Slide effect */
@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 1. Base state - no vertical movement to avoid bottom gaps */
.reveal-section {
    opacity: 0;
    transition: opacity 1s ease-out;
}   

/* 2. Visible state */
.reveal-section.is-visible {
    opacity: 1;
}

/* 3. Safety: Ensure no overflow issues */
#brx-content {
    overflow-x: hidden;
}

/* The Animation Keyframes */
@keyframes autoFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* The Single Class */
.mobile-fade-3s {
    opacity: 0; /* Start hidden */
    animation-name: autoFadeIn;
    animation-duration: 3s;
    animation-delay: 5s;
    animation-fill-mode: forwards; /* Keeps the element visible after animation ends */
}

/* =========================================
   HEADER and MENU STYLES
   ========================================= */


/* Target the link that is currently active */
.header-nav-item[aria-current="page"] {
  position: relative;
  color: var(--color-dark); /* Your brand gold */
}

/* Add the underline */
.header-nav-item[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0px; /* Space between text and line */
  width: 100%;
  height: 1px;
  background-color: var(--color-dark); /* Matches the text color automatically */
}

/* 1. The Base State */
header {
    height: 12rem;
    padding: 20px 0;
    /* Synchronized timing with the logo for a unified feel */
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.5s ease;
}

@media screen and (max-width: 768px) {
    header {
        height: 55px; /* Slightly shorter on mobile for better aesthetics */
        padding: 15px 0;
    }
}

/* Target the Logo & SVG */
header .bricks-logo-img,
header .bricks-logo-img svg,
header .brxe-logo img,
header img.logo {
    height: clamp(30px, 5vw, 80px) !important; 
    width: auto !important;   
    /* Use the exact same timing as the header for perfect sync */
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. The Scrolled State */
header.scrolling {
  height: 7rem; 
  padding: 10px 0;
  background-color: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

/* Force all potential logo selectors to the same scroll size */
header.scrolling .bricks-logo-img,
header.scrolling .bricks-logo-img svg,
header.scrolling .brxe-logo img,
header.scrolling img.logo {
    height: 50px !important; 
}


@media screen and (max-width: 768px) {
    header {
        height: 65px; /* Slightly shorter on mobile for better aesthetics */
        padding: 15px 0;
    }
    /* Target the Logo & SVG */
    header .bricks-logo-img,
    header .bricks-logo-img svg,
    header .brxe-logo img,
    header img.logo {
        height: 35px !important; 
        width: auto !important;   
        /* Use the exact same timing as the header for perfect sync */
        transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: height; 
    }
    /* Force all potential logo selectors to the same scroll size */
    header.scrolling .bricks-logo-img,
    header.scrolling .bricks-logo-img svg,
    header.scrolling .brxe-logo img,
    header.scrolling img.logo {
        height: 30px !important; 
    }

    /* 2. The Scrolled State */
    header.scrolling {
    height: 6rem; 
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    }

}


.avra-popup-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.avra-popup-overlay.is-open {
  opacity: 1;
  visibility: visible;
}


/* Initial state for links */
.avra-popup-overlay .avra-popup-content a {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
}

/* State when popup is open */
.avra-popup-overlay.is-open .avra-popup-content a {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger the links */
.avra-popup-overlay.is-open .avra-popup-content a:nth-child(1) { transition-delay: 0.1s; }
.avra-popup-overlay.is-open .avra-popup-content a:nth-child(2) { transition-delay: 0.2s; }
.avra-popup-overlay.is-open .avra-popup-content a:nth-child(3) { transition-delay: 0.3s; }
.avra-popup-overlay.is-open .avra-popup-content a:nth-child(4) { transition-delay: 0.4s; }
.avra-popup-overlay.is-open .avra-popup-content a:nth-child(5) { transition-delay: 0.5s; }
.avra-popup-overlay.is-open .avra-popup-content a:nth-child(6) { transition-delay: 0.6s; }
.avra-popup-overlay.is-open .avra-popup-content a:nth-child(7) { transition-delay: 0.7s; }
.avra-popup-overlay.is-open .avra-popup-content a:nth-child(8) { transition-delay: 0.8s; }


.avra-popup-overlay {
  /* Prevents Safari from trying to 'pan' or 'zoom' the background */
  touch-action: none; 
  /* Ensures the momentum scrolling is smooth inside the menu if it's long */
  -webkit-overflow-scrolling: touch;
}


.avra-popup-overlay {
  /* env() variables are specifically for the iPhone 'notch' and 'home bar' */
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
  padding-top: env(safe-area-inset-top);
}

.avra-popup-overlay {
  height: 100vh; /* Fallback 1 */
  height: -webkit-fill-available; /* Fallback 2 (Safari specific) */
  height: 100dvh; /* The modern standard */
}


/* =========================================
   FLOORPLANS // Table and Filters Styles
   ========================================= */
  /* 1. INTERACTIVE UNIT SHAPES */
  [data-unit] { 
    cursor: pointer; 
    transition: all 0.3s ease;
    fill: transparent; /* No background color initially */
    pointer-events: all; 
  }

  /* Hover highlight - Adjust #bd9260 to your preferred highlight color */
  [data-unit]:hover { 
    fill: rgba(189, 146, 96, 0.4) !important; 
  }

  /* 2. ARCHITECTURAL OUTLINES (The "Map" itself) */
  .st2 {
    fill: #231f20; /* The black/dark lines */
    pointer-events: none; 
  }

  /* 3. LABELS */
  .st4 { 
    font-family: ProximaNova-Medium, 'Proxima Nova', Arial, sans-serif; 
    font-size: 5px; 
    font-weight: 500; 
    fill: #000;
    pointer-events: none; 
  }

  /* 4. UTILITY */
  .st5 { stroke: #fff; stroke-width: .3px; fill: none; pointer-events: none; }
  .st6 { stroke: #000; stroke-width: .25px; fill: none; }

    /* Change this line in your SVG <style> block */
    [data-unit]:hover, 
    [data-unit].is-highlighted { 
        fill: rgba(189, 146, 96, 0.7) !important; /* Made it slightly more opaque for the highlight */
        transition: all 0.3s ease;
    }

    .arch-outline {
  /* This empties the interior of the path */
  fill: none !important;
  
  /* This draws the actual line */
  stroke: #231f20; 
  stroke-width: 2.3px;
  
  /* Critical: prevents lines from intercepting mouse clicks */
  pointer-events: none;
  
  /* Optional: keeps line thickness consistent if you zoom/scale the SVG */
  vector-effect: non-scaling-stroke;
}

/* Ensure your interactive units stay invisible but functional */
#interactive-layer path, 
#interactive-layer polyline, 
#interactive-layer polygon {
  fill: transparent;
  cursor: pointer;
}

/* Give the elevator rectangles a solid background */
rect.arch-outline {
  fill: #f0f0f0 !important; /* Light grey background for the elevator shaft */
}

/* 2. EXCEPTION: The Elevator Backgrounds */
.elevator-box {
  fill: #231f20 !important; /* This makes the box solid dark */
  stroke: none;
  pointer-events: none;
}

/* 3. EXCEPTION: The Elevator Arrows */
.elevator-arrow {
  fill: none;
  stroke: #ffffff !important; /* Makes the arrows white so they show on the dark box */
  stroke-width: 0.3px;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

/* =========================================
   1. BASE STYLES (Applies to all screens)
   ========================================= */

.avra-navigator-grid {
    width: 100%;
    margin: 0 auto;
}

/* Dropdown Aesthetics */
.avra-custom-dropdown {
    position: relative;
    font-family: inherit;
    flex: 1;
}

.selected-option {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #b1967a; /* AVRA Bronze */
    color: #ffffff;
    transition: background 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.avra-custom-dropdown:last-child .selected-option {
    background-color: #1a1a1a; /* Dark Contrast */
}

.selected-option:after {
    content: '▼';
    font-size: 10px;
    margin-left: 10px;
}

/* Table Aesthetics */
.residence-row {
    border-bottom: 1px solid #d1cdc7;
    transition: background 0.3s ease;
    cursor: pointer;
}

.residence-row:hover {
    background-color: rgba(177, 150, 122, 0.1);
}

.residence-row.is-active {
    background-color: #e5ddd3;
}

.table-row.header {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    border-bottom: 2px solid #1a1a1a;
}

/* Options List */
.options-list {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 1000;
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    max-height: 250px;
    overflow-y: auto;
    background: #f4f1ee;
    color: #1a1a1a;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.option-item {
    padding: 12px 20px;
    transition: background 0.2s;
}

.option-item:hover {
    background: #e5ddd3;
}

/* =========================================
   2. DESKTOP LAYOUT (992px and up)
   ========================================= */
@media screen and (min-width: 992px) {
    .avra-navigator-grid {
        display: grid;
        grid-template-columns: repeat(12, 1fr);
        gap: 3rem;
        align-items: start;
    }

    .map-container {
        grid-column: 1 / 5;
        position: sticky;
        top: 2rem;
        display: block;
    }

    .inventory-container, 
    .avra-filters {
        grid-column: 5 / 13;
    }

    .avra-filters {
        display: flex;
        gap: 15px;
        margin-bottom: 30px;
    }

    .selected-option {
        padding: 18px 25px;
        font-size: 14px;
    }

    .table-row.header, 
    .residence-row {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        padding: 20px 0;
        text-align: center;
    }
}

/* =========================================
   3. MOBILE LAYOUT (991px and down)
   ========================================= */
@media screen and (max-width: 991px) {
    .avra-navigator-grid {
        display: block;
        padding: 0;
    }

    .map-container {
        display: none; /* Hide map on mobile as requested */
    }

    .avra-filters {
        display: flex;
        flex-direction: row; /* Keep dropdowns side-by-side */
        gap: 10px;
        margin-bottom: 20px;
    }

    .selected-option {
        padding: 12px 15px;
        font-size: 12px;
    }

    .table-row.header, 
    .residence-row {
        display: grid;
        /* Custom spacing to fit all 6 columns on one line */
        grid-template-columns: 1.2fr 0.8fr 0.8fr 1.2fr 1.2fr 1.2fr;
        gap: 4px;
        text-align: left;
    }

    .table-row.header {
        font-size: 9px;
        padding: 10px 0;
    }

    .residence-row {
        font-size: 12px;
        padding: 15px 0;
    }
}

/* Custom Scrollbar for the options */
.options-list::-webkit-scrollbar {
    width: 6px;
}
.options-list::-webkit-scrollbar-track {
    background: #f4f1ee;
}
.options-list::-webkit-scrollbar-thumb {
    background: #C19A6B; /* Bronze thumb */
}

.avra-custom-dropdown.is-open .options-list {
    display: block;
}

.avra-custom-dropdown.is-open .options-list {
    display: block;
}

.option-item {
    padding: 12px 20px;
    background: #f4f1ee;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #e2e0dd;
}

.option-item:hover {
    background: #C19A6B;
    color: white;
}

/* Theme specifics */
.is-bronze .selected-option { background: #C19A6B; color: white; }
.is-dark .selected-option { background: #1a1a1a; color: white; }

/* Custom arrow icon */
.selected-option::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
    margin-bottom: 4px;
}

/* Base state: Dark */
.avra-custom-dropdown .selected-option {
    background: #1a1a1a;
    color: white;
    transition: background 0.4s ease;
}

/* Active state: Bronze */
.avra-custom-dropdown.is-active .selected-option {
    background: #C19A6B;
    color: white;
}


/* Container transition */
.map-container, .inventory-container {
    transition: opacity 0.3s ease-in-out;
}

/* Loading state */
.is-filtering {
    opacity: 0.5;
    pointer-events: none; /* Prevents double-clicking while loading */
    cursor: wait;
}

/* Optional: Add a simple spinner overlay if you want it more obvious */
.avra-navigator-grid {
    position: relative;
}



/* =========================================
   LOCATION
   ========================================= */

.location-list-title {
    color: black;
    font-weight: 600;
    padding-left: 10px;
}
.custom-listing-item:hover {
    color: black;
}

/* MAP INFO WINDOW */   

/* The main container of the popup */
.wpgmza-infowindow {
    border-radius: 8px !important;
    font-family: inherit !important;
}

.wpgmza_infowindow_description, .gm-style-iw-chr {
    display: none !important; /* Hides the default description if not needed */
}

/* The body text/address */
.wpgmza-infowindow p {
    font-size: 14px;
    color: white;
}

/* The "Directions" or "Link" buttons inside */
.wpgmza-infowindow a {
    color: #bd9260;
    text-decoration: underline;
    font-weight: 600;
}
.gm-style .gm-style-iw-c {
    padding: 0 !important; /* Remove default padding for better control */
}
.wpgmza_map .gm-style .gm-style-iw-c .gm-style-iw-d {
    padding: 10px !important;
}
/* Targeted override for Google Maps InfoWindow wrapper */
.gm-style .gm-style-iw-c {
    background-color: black !important; /* Match your site background */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
}

.gm-style .gm-style-iw-tc::after {
    background-color: black !important; /* Match the InfoWindow background */
}
/* Remove the default 'X' close button background if needed */
.gm-ui-hover-effect {
    top: 2px !important;
    right: 2px !important;
}

