/* ==========================================================================
   Global Styles & Variables
   ========================================================================== */

/* --- Root Variables --- */
@layer base {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
}
:root {
  --color-primary: #1A73E8; /* Updated Selected Marker Color */
  --color-secondary: #1A73E8; /* Calc Secondary */
  --color-primary-light: #f0f4f7; /* Lighter shade of primary for hover */
  --color-accent: #4285F4; /* Lighter shade of primary for hover */
  --color-primary-blue: #1a73e8; /* Google Blue (Index Primary Button, Links) */
  --color-primary-blue-dark: #1669c1;
  --color-green-success: #1e8e3e; /* Google Green (Calc Primary Button, Active Marker) */
  --color-green-dark: #1a7431; /* Darker Google Green */
  --color-red-error: #d93025;  /* Google Red (Errors) */
  --color-black-default: #000000; /* Default Marker Color */

  --color-text-dark: #202124; /* Google Dark Grey */
  --color-text-grey: #5f6368; /* Google Medium Grey */
  --color-text-light: #80868b; /* Google Light Grey */
  --color-text-white: #ffffff;

  --color-background: #f5f7fa; /* Calc Background */
  --color-background-light: #f8f9fa; /* Index Background */
  --color-background-medium: #e9ecef;
  --color-white: #ffffff;
  --color-investment-bg: #f8f9fa; /* Lighter gray background for calc investment */
  --color-tooltip-bg: #323232;
  --color-tooltip-text: #ffffff;

  --color-border-light: #eee;
  --color-border-medium: #dadce0; /* Google Border Grey */
  --color-grey-secondary: #dadce0; /* Calc Grey Button BG */
  --color-grey-dark: #d2d5d9; /* Calc Grey Button Hover BG */

  --color-hover-light-blue: #e8f0fe;
  --color-hover-medium-blue: #d2e3fc;

  /* Marker colors as strings for JS (Must match above color definitions) */
  --marker-color-default-str: '#000000'; /* Black */
  --marker-color-selected-str: '#ff0088'; /* Magenta */
  --marker-color-active-str: '#1a7431';   /* Magenta */

  /* Marker Animation Variables */
  --marker-transition-duration: 0.3s;
  --marker-transition-timing: ease-in-out;

  --border-radius-standard: 4px;
  --border-radius-large: 8px;
  --border-radius-pill: 24px;
  --border-radius-calc: 12px;
  --border-radius-tooltip: 4px;

  --shadow-subtle: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  --shadow-overlay: 0 4px 12px rgba(0,0,0,0.2);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 4px 23px 5px rgba(0,0,0,.2), 0 2px 6px rgba(0,0,0,.15);
  --shadow-tooltip: 0 2px 5px rgba(0,0,0,0.2);

  --transition-standard: all 0.2s ease-in-out;
  --transition-smooth: all 0.3s ease-in-out;

  --font-size-small: 0.875rem;
  --font-size-xsmall: 0.75rem;
  --input-padding-y: 10px;
  --input-padding-x: 12px;
  --input-font-size: 1rem;
}

/* Global Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
.nowrap{
  white-space: nowrap;
}
html {
  scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: 'Roboto', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background-color: var(--color-background-light);
  color: var(--color-text-dark);
  line-height: 1.6;
  min-height: calc(100vh - 60px);
  padding-bottom: 0;
}
.logo img{
  height: 45px;
}
.sticky-footer .cart-price-daily{
  display: none;
}
/* ==========================================================================
   Index Page: Header
   ========================================================================== */

.fixed-header {
  position: fixed; top: 0; left: 0; width: 100%; height: 60px;
  background-color: var(--color-white); color: var(--color-text-dark);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; z-index: 1000;  
}
.fixed-header .logo { font-size: 1.5rem; font-weight: bold; color: var(--color-primary-blue); cursor: pointer; }
.fixed-header .cart { display: flex; align-items: center; cursor: pointer; padding: 8px 12px; border-radius: 20px; transition: background-color var(--transition-standard); }
.fixed-header .cart:hover { background-color: var(--color-hover-light-blue); }
.fixed-header .cart .material-symbols-outlined { font-size: 26px; color: var(--color-text-grey); margin-right: 8px; vertical-align: middle; font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; }
.fixed-header .cart .price { font-size: 1rem; color: var(--color-text-grey); font-weight: 500; min-width: 80px; text-align: right; }

/* ==========================================================================
   Index Page: Page Container & Switching
   ========================================================================== */
#page-cart .page-footer, 
#page-contact .page-footer{
  white-space: nowrap;
    margin: 25px 0px -5px;
    display: flex;
    gap: 10px;
    place-content: center space-evenly;
    align-items: center;
    flex-wrap: nowrap;
    padding: 15px 0px 0px !important;
    z-index: 1000;
 
}
.page-container {
  margin-top: 60px;
  height: calc(100vh - 60px);
  position: relative;
 
}

.page {
  width: 100%; 
  height: 100%; 
  position: absolute; 
  top: 0; 
  left: 0; 
  overflow: auto;
  background-color: var(--color-background-light); 
  display: none; /* Hide pages by default */
  visibility: hidden; 
  opacity: 0;
  transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
  z-index: 1; 
  flex-direction: column;
}
.page.active { 
  position: relative; 
  display: flex; /* Show active page */
  visibility: visible; 
  opacity: 1; 
  z-index: 2; 
}

/* Specific page styles */
#page-home {    padding: 0;
  height: calc(100% - 60px);
}  
#page-cart { 
  background-color: var(--color-background); 
  padding: 0; 
  overflow-x: hidden; 
  /* Center content on desktop - use available height instead of full viewport */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}




#calculator-frame { flex-grow: 1; border: none; width: 100%; height: 100%; }
#page-contact { 
  background-color: var(--color-background);
  padding: 30px 20px;
  align-items: center;
  justify-content: flex-start;
}
#page-thankyou {     padding: 30px 20px;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: fit-content;}
#page-thankyou h2 { color: var(--color-text-dark); margin-bottom: 15px; }
#page-thankyou p { color: var(--color-text-grey); margin-bottom: 10px; max-width: 500px; line-height: 1.7; }
#page-thankyou .payment-info { font-size: var(--font-size-small); color: var(--color-text-light); margin-top: 20px; display: flex; align-items: center; justify-content: center; gap: 8px; }
#page-thankyou .payment-info .material-symbols-outlined { font-size: 1.2rem; color: var(--color-green-success); }


/* ==========================================================================
   Index Page: Home (Map/List)
   ========================================================================== */

/* Search Container Layout */
.map-selection-container {
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  max-height: 0;
  opacity: 0;
  margin-top: 0;
  visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.map-selection-container.visible {
  max-height: 50px;
  opacity: 1;
  margin-top:  0px;
  visibility: hidden;
  display: none !important;
}

.view-options {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  justify-content: center;
  visibility: visible;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  width: 0;
  height: 0;
}

.checkmark {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid var(--color-border-medium);
  border-radius: 3px;
  position: relative;
  transition: all 0.2s ease;
  background-color: var(--color-white);
}

.checkbox-container:hover input[type="checkbox"] ~ .checkmark {
  border-color: var(--color-primary);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: -1px;
  width: 3px;
  height: 10px;
  border: 2px solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-container span:not(.checkmark) {
  color: var(--color-text-dark);
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .map-selection-container.visible {
      margin-top: 0;
  }
  
  .view-options {
      padding: 8px;
      gap: 12px;
  }
  
  .checkbox-container {
      font-size: 0.85rem;
  }
  .logo img{
    height: 30px;
  }
}

.search-container { padding: 15px 20px; background-color: var(--color-white); border-bottom: 1px solid var(--color-border-medium); display: flex; justify-content: center; flex-shrink: 0; }
.search-box-wrapper {
  display: flex;
  align-items: center;
  gap: 15px;
  width: 100%;
  max-width: 700px;
  flex-wrap: wrap;
}
.search-box { position: relative; flex-grow: 1; min-width: 200px; }
.search-box input[type="text"] { width: 100%; padding: var(--input-padding-y) 20px var(--input-padding-y) 45px; border: 1px solid var(--color-border-medium); border-radius:  0px; font-size: var(--input-font-size); outline: none; transition: box-shadow 0.2s; height: 44px; }
.search-box input[type="text"]:focus { border-color: var(--color-primary-blue); box-shadow: 0 0 0 1px var(--color-primary-blue); }
.search-box .search-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; fill: var(--color-text-grey); }
.search-options { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.search-options label { font-size: var(--font-size-small); color: var(--color-text-grey); white-space: nowrap; }
.search-options select { padding: 8px 30px 8px 10px; border: 1px solid var(--color-border-medium); border-radius: var(--border-radius-standard); font-size: 0.9rem; background-color: var(--color-white); cursor: pointer; height: 44px; -webkit-appearance: none; -moz-appearance: none; appearance: none; background-image: url('data:image/svg+xml;utf8,<svg fill="%235f6368" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'); background-repeat: no-repeat; background-position: right 8px center; background-size: 20px; transition: border-color 0.2s; }
.search-options select:focus { outline: none; border-color: var(--color-primary-blue); box-shadow: 0 0 0 1px var(--color-primary-blue); }
.search-options .search-submit-btn { height: 44px; padding: 0 20px; font-size: 0.9rem; white-space: nowrap; }
/* Disabled State for Search Elements */
.search-box input[type="text"]:disabled, .search-options select:disabled, .search-options .search-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; background-color: var(--color-background-medium); }
.search-box input[type="text"]:disabled { box-shadow: none; border-color: var(--color-border-medium); }
.search-options select:disabled { box-shadow: none; border-color: var(--color-border-medium); background-image: url('data:image/svg+xml;utf8,<svg fill="%23a9abad" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'); }
.search-options .search-submit-btn:disabled { box-shadow: none; background-color: var(--color-primary-blue); }

/* Map/List Container */
.map-list-container { position: relative; height: calc(100% - 71px); display: flex; flex-direction: column; background-color: var(--color-background-medium); overflow: hidden; }
#map, #list { flex-grow: 1; overflow-y: auto; display: none; background-color: var(--color-white); min-height: 200px; position: relative; }
#map.active, #list.active { display: block; }

/* List Item Styling */
.list-item { padding: 15px 20px 15px 50px; border-bottom: 1px solid var(--color-border-light); transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s; cursor: pointer; position: relative; padding-right: 20px; }
.list-item:last-child { border-bottom: none; }
.list-item:hover { background-color: var(--color-hover-light-blue); }
.list-item.hovered { background-color: var(--color-hover-medium-blue); }
.list-item.selected { background-color: var(--color-hover-light-blue); border-left: 4px solid var(--color-accent); padding-left: 46px; }
.list-item-content { display: flex; flex-direction: column; }
.list-item-id { font-size: 1rem; font-weight: 600; color: var(--color-text-dark); margin-bottom: 4px; }
.list-item-address { font-size: var(--font-size-small); color: var(--color-text-grey); margin-bottom: 8px; line-height: 1.4; }
.list-item-details { display: flex; gap: 15px; font-size: var(--font-size-xsmall); color: var(--color-text-light); }
.location-checkbox { position: absolute; left: 15px; top: 20px; height: 20px; width: 20px; cursor: pointer; accent-color: var(--color-accent); z-index: 1; }

/* List Item Action Buttons Container */
.list-item-actions { display: flex; gap: 8px; align-items: center; z-index: 1; }

/* Individual List Item Buttons */
.list-item-select-btn, .list-item-cart-btn, .list-item-streetview-btn {
  padding: 4px 10px; font-size: 0.8rem; min-width: 80px; text-transform: none;
  letter-spacing: normal; white-space: nowrap;
}
.cart-share-container{
  display: flex ;
      gap: 10px;
      margin: 10px;
      justify-content: center;
      white-space: nowrap;
}
/* Default Button Visibility */
.list-item-select-btn, .list-item-cart-btn, .list-item-streetview-btn {
  display: none; /* Hide all buttons by default */
}
/* Show Select button only if item is NOT selected (JS also manages this) */
.list-item:not(.selected) .list-item-select-btn {
  /* display: inline-block;  Let JS handle showing initially */
}


/* --- (5) Desktop Button Visibility Logic (min-width: 768px) --- */
@media (min-width: 768px) {
  /* Place actions absolutely on desktop */
  .list-item-actions {
    position: absolute; right: 15px; top: 50%; transform: translateY(-50%);
    opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  .list-item:hover .list-item-actions { opacity: 1; visibility: visible; }

  /* Desktop: Hover on NON-SELECTED item */
  .list-item:not(.selected):hover .list-item-select-btn { display: inline-block; }
  .list-item:not(.selected):hover .list-item-streetview-btn { display: inline-block; }
  .list-item:not(.selected) .list-item-cart-btn { display: none !important; } /* Never show cart on desktop */

  /* Desktop: Hover or State of SELECTED item */
  .list-item.selected .list-item-select-btn { display: none !important; } /* Hide Select */
  .list-item.selected .list-item-streetview-btn { display: inline-block; } /* Show Street View */
  .list-item.selected .list-item-cart-btn { display: none !important; } /* Never show cart on desktop */

  /* Center calculator container on desktop */
  .calculator-container { 
    margin: 40px auto; 
    max-width: 1000px;
    /* Add some breathing room on sides */
    width: calc(100% - 40px);
  }
  
  /* Center contact container on desktop */
  .contact-container {
    margin: 40px auto;
    max-width: 700px;
    /* Add some breathing room on sides */
    width: calc(100% - 40px);
  }
}

/* --- Mobile Button Visibility Logic (max-width: 767px) --- */
@media (max-width: 767px) {
  /* Position actions statically on mobile */
  .list-item-actions {
    position: static; transform: none; margin-top: 10px; padding-left: 35px;
    flex-wrap: wrap;
    /* Only show action container if selected */
    display: none;
  }
  .list-item.selected .list-item-actions { display: flex; }

  /* Mobile: SELECTED item */
  .list-item.selected .list-item-select-btn { display: none !important; } /* Hide Select */
  .list-item.selected .list-item-cart-btn { display: inline-block; } /* Show Go to Cart */
  .list-item.selected .list-item-streetview-btn { display: none !important; } /* Hide Street View */

  /* Mobile: NON-SELECTED item (actions container hidden anyway) */
  .list-item:not(.selected) .list-item-select-btn { /* display: inline-block; -- JS handles initial display */ }
  .list-item:not(.selected) .list-item-cart-btn { display: none !important; }
  .list-item:not(.selected) .list-item-streetview-btn { display: none !important; }
}


/* List Item Highlight Animation (Desktop) */
@keyframes highlight-pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(173, 46, 173, 0.4); background-color: var(--color-hover-medium-blue); } 70% { transform: scale(1.015); box-shadow: 0 0 0 12px rgba(173, 46, 173, 0); background-color: var(--color-hover-medium-blue); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(173, 46, 173, 0); background-color: var(--color-hover-light-blue); } }
.list-item-highlighted { animation: highlight-pulse 0.8s ease-out forwards; position: relative; z-index: 2; }
.list-item-highlighted:hover { background-color: var(--color-hover-light-blue); }
.list-item-highlighted.selected { border-left: 4px solid var(--color-primary); padding-left: 46px; }

/* Toggle Button (Mobile) */
.toggle-button { position: absolute; bottom: 25px; left: 50%; transform: translateX(-50%); background-color: var(--color-primary-blue); border: none; border-radius: 50%; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-overlay); transition: background-color 0.3s, transform 0.3s; z-index: 500; }
.toggle-button:hover { background-color: var(--color-primary-blue-dark); transform: translateX(-50%) scale(1.05); }
.toggle-button svg { fill: var(--color-white); width: 24px; height: 24px; }

/* Mobile Map Info Overlay */
#map-info-overlay {
    position: absolute;
    bottom: 20px;
    left: 10px;
    right: 10px;
    background-color: var(--color-white);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-overlay);
    padding: 15px;
    padding-right: 35px;
    z-index: 1001; /* Increased from 600 to be safely above the footer (z-index: 1000) */
    display: none;
    max-width: 400px;
    margin: 0 auto;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    transform: translateY(20px);
}
#map-info-overlay.visible { display: block; opacity: 1; transform: translateY(0); }
.close-overlay-btn { position: absolute; top: 8px; right: 10px; background: none; border: none; font-size: 1.5rem; font-weight: bold; color: var(--color-text-light); cursor: pointer; padding: 0; line-height: 1; }
.close-overlay-btn:hover { color: var(--color-text-dark); }
.overlay-content h4 { font-size: 1rem; font-weight: 600; color: var(--color-text-dark); margin-bottom: 4px; }
.overlay-content p { font-size: var(--font-size-small); color: var(--color-text-grey); margin-bottom: 8px; line-height: 1.4; }
.overlay-content #overlay-details { font-size: var(--font-size-xsmall); color: var(--color-text-light); margin-bottom: 12px; display: flex; gap: 10px; flex-wrap: wrap; }
.overlay-buttons { display: flex; flex-direction: row; gap: 10px; margin-top: 10px; }
#overlay-select-btn { display: block; width: 100%; padding: 8px 15px; font-size: 0.9rem; font-weight: 500; background-color: var(--color-primary); color: var(--color-white); border: none; border-radius: var(--border-radius-standard); cursor: pointer; transition: background-color 0.2s; }
#overlay-select-btn:hover { background-color: var(--color-accent); }
#overlay-streetview-btn { display: block; width: 100%; padding: 8px 15px; font-size: 0.9rem; font-weight: 500; background-color: transparent; color: var(--color-primary-blue); border: 1px solid var(--color-border-medium); border-radius: var(--border-radius-standard); cursor: pointer; transition: background-color 0.2s, border-color 0.2s; text-align: center; }
#overlay-streetview-btn:hover { background-color: var(--color-hover-light-blue); border-color: var(--color-primary-blue); }
#overlay-streetview-btn:disabled { color: var(--color-text-light); border-color: var(--color-border-light); background-color: var(--color-background-light); cursor: not-allowed; }

.overlay-image-container {
    width: 100%;
    position: relative;
    padding-top: 56.25%; /* Maintains a 16:9 aspect ratio. */
    overflow: hidden;
    border-radius: var(--border-radius-large) var(--border-radius-large) 0 0;
    
    /* The solid background color remains as a clean fallback. */
    background-color: #e9ecef; 
    
    /* 
      All background-image, background-repeat, background-position,
      and background-size properties have been REMOVED.
    */
    max-width: 100%;
}


/* On very small containers, prevent the icon from being too large */
@media (max-width: 200px) {
    .overlay-image-container {
        background-size: 64px 64px;
    }
}

/* Specific adjustment for the mobile overlay to make it edge-to-edge. */
#map-info-overlay .overlay-image-container {
    margin: -15px -35px 15px -15px;
    border-radius: var(--border-radius-large);
}

.overlay-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    /* The image starts hidden and will be shown by JS on load. */
    /* This prevents a "broken image" icon from showing if the file is missing. */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

/* --- FIX FOR CLOSE BUTTON --- */
/* We remove the changes from the previous attempt as they were incorrect.
   The button's default positioning is correct; we just need to ensure
   the image container does not interfere. This is handled by the
   image container's `position: relative` and the button's `position: absolute` */

/* (No changes are now needed for the .close-overlay-btn itself,
   as the problem was in the image container's complexity) */



/* ==========================================================================
   Calculator Page (Inside Iframe)
   ========================================================================== */

.calculator-container { width: 100%; max-width: 900px; background-color: var(--color-white); border-radius: var(--border-radius-calc); box-shadow: var(--shadow-soft); padding: 30px 40px; transition: var(--transition-smooth); position: relative; margin: 20px auto; }
.calculator-header { display: flex; align-items: center; justify-content: center; position: relative; margin-bottom: 30px; }
.back-icon-btn { position: absolute; left: 0; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--color-text-light); padding: 5px; display: inline-flex; align-items: center; justify-content: center; transition: color 0.2s ease; }
.back-icon-btn .material-symbols-outlined { font-size: 1.75rem; font-variation-settings: 'wght' 300; }
.back-icon-btn:hover { color: var(--color-text-dark); }
.calculator-title { font-size: 2rem; font-weight: 700; color: var(--color-text-dark); margin: 0; text-align: center; flex-grow: 1; padding-left: 30px; padding-right: 30px; }
.calculator-body { display: flex; flex-direction: column; gap: 30px;  }
.main-controls { flex: 1; min-width: 0; }
.sidebar-details { flex-shrink: 0; }
.input-group.hidden { display: none; }
.selected-billboards-section { margin-bottom: 25px; padding: 15px; background-color: #f8f9fa; border-radius: var(--border-radius-calc); border: 1px solid #e9ecef; }
.selected-billboards-section h3 { font-size: 1rem; font-weight: 600; color: var(--color-text-dark); margin-bottom: 15px; text-align: center; }
#selected-billboards-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: 150px; overflow-y: auto; padding-right: 5px; min-height: 30px; align-content: flex-start; }
#selected-billboards-list::-webkit-scrollbar { width: 6px; }
#selected-billboards-list::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 3px;}
#selected-billboards-list::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px;}
#selected-billboards-list::-webkit-scrollbar-thumb:hover { background: #aaa; }
#selected-billboards-list .placeholder-text { color: var(--color-text-light); font-size: var(--font-size-small); width: 100%; text-align: center; padding: 5px 0; }
.selected-item { display: inline-flex; align-items: center; background-color: var(--color-white); border: 1px solid var(--color-grey-secondary); border-radius: 15px; padding: 4px 8px 4px 10px; font-size: var(--font-size-small); color: var(--color-text-grey); white-space: nowrap; }
.remove-item-btn { background: none; border: none; color: var(--color-red-error); font-size: 1.1rem; font-weight: bold; margin-left: 6px; cursor: pointer; padding: 0 2px; line-height: 1; opacity: 0.7; transition: opacity 0.2s; }
.remove-item-btn:hover { opacity: 1; }
.input-group { margin-bottom: 25px; }
.input-label { display: block; margin-bottom: 10px; font-weight: 600; color: var(--color-text-dark); }
.input-description { font-size: var(--font-size-small); color: var(--color-text-light); margin-bottom: 8px; }
.input-wrapper { display: flex; align-items: center; gap: 15px; }
.input-number { flex: 1; width: 100%; padding: 12px 15px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 16px; transition: var(--transition-smooth); }
.input-number:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(173, 46, 173, 0.2); }
.input-number[readonly] { background-color: #e9ecef; opacity: 0.7; cursor: not-allowed; }
.input-range { flex: 2; appearance: none; -webkit-appearance: none; width: 100%; max-height: 8px; background: #e0e0e0; border-radius: 4px; outline: none; transition: var(--transition-smooth); cursor: pointer; }
.input-range::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; background: var(--color-primary); border-radius: 50%; cursor: pointer; transition: var(--transition-smooth); border: none; }
.input-range::-moz-range-thumb { width: 20px; height: 20px; background: var(--color-primary); border-radius: 50%; cursor: pointer; transition: var(--transition-smooth); border: none; }
.input-range:enabled::-webkit-slider-thumb:hover { background: var(--color-accent); }
.input-range:enabled::-moz-range-thumb:hover { background: var(--color-accent); }
.input-range:disabled { cursor: not-allowed; opacity: 0.6; }
.input-range:disabled::-webkit-slider-thumb { background: #ccc; cursor: not-allowed; }
.input-range:disabled::-moz-range-thumb { background: #ccc; cursor: not-allowed; }
.investment-result { background: var(--color-investment-bg); color: var(--color-text-dark); text-align: center; padding: 20px 25px; border-radius: var(--border-radius-calc);  border: 1px solid #e0d6f5; white-space: nowrap; }
.result-label { font-size: 1rem; font-weight: 600; margin-bottom: 8px; color: var(--color-text-dark); }
.result-monthly { font-size: 2.25rem; font-weight: 700; color: var(--color-primary); }
.result-daily { font-size: 1.1rem; font-weight: 400; margin-left: 8px; color: var(--color-text-light); }
.details-summary { background-color: #f8f9fa; border-radius: var(--border-radius-calc); padding: 20px; border: 1px solid #e9ecef; height: 100%; overflow-wrap: break-word; position: relative; }
.details-summary h4 { font-size: 1rem; font-weight: 600; color: var(--color-text-dark); margin-bottom: 15px; padding-bottom: 5px; border-bottom: 1px solid var(--color-grey-secondary); }
.details-summary ul { list-style: none; padding: 0; margin: 0; font-size: var(--font-size-small); color: var(--color-text-light); line-height: 1.9; }
.details-summary li { 
  padding-left: 1.3em; 
  position: relative; 
  margin-bottom: 8px;
  white-space: nowrap;
}
.details-summary li::before { content: '•'; color: var(--color-primary); font-weight: bold; display: inline-block; position: absolute; left: 0; top: 0px; }
.details-summary strong { font-weight: 600; color: var(--color-text-grey); }
.no-billboards-message { font-style: italic; color: var(--color-text-light); text-align: center; padding: 20px 0; }
.tooltip-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 8px; color: var(--color-text-light); cursor: help; vertical-align: middle; opacity: 0.7; transition: opacity 0.2s ease; position: relative; }
.tooltip-icon:hover { opacity: 1; color: var(--color-primary); }
.tooltip-icon .material-symbols-outlined { font-size: 16px; font-variation-settings: 'wght' 300; }
.tooltip-popup-container { position: fixed; z-index: 1010; pointer-events: none; top: 0; left: 0; width: 200px; display: inline-block; height: 0; overflow: visible; }
.tooltip-popup { position: absolute; background-color: var(--color-tooltip-bg); color: var(--color-tooltip-text); padding: 8px 12px; border-radius: var(--border-radius-tooltip); font-size: var(--font-size-xsmall); line-height: 1.5; max-width: 240px; text-align: left; box-shadow: var(--shadow-tooltip); opacity: 0; visibility: hidden; transform: translateY(5px); transition: opacity 0.15s ease-out, transform 0.15s ease-out, visibility 0s linear 0.15s; white-space: normal; pointer-events: auto; }
.tooltip-popup.visible { opacity: 1; visibility: visible; transform: translateY(0); transition-delay: 0s, 0s, 0s; }
.calculator-formula { text-align: center; background-color: #f1f3f5; padding: 15px; border-radius: var(--border-radius-calc); font-family: monospace; font-size: 0.9em; word-break: break-all; margin-bottom: 30px; }
.calc-navigation { display: flex; flex-direction: column; gap: 15px; align-items: center; }

/* Styling for the new offer and savings notices */
.offer-notice {
    text-align: center;
    font-size: var(--font-size-small);
    color: var(--color-text-grey);
    padding: 0 10px;
    transition: opacity 0.3s ease-in-out;
    margin: 15px auto 0;
    max-width: 400px;
    line-height: 1.5;
}

/* New container for the footer button and its notice */
.footer-action-group {
    display: flex;
    flex-direction: column; /* Stacks button and notice vertically */
    align-items: center;   /* Centers them horizontally */
    width: 100%;
    max-width: 350px; /* Controls max width on desktop */
}

.savings-notice {
    margin-top: 12px;
    width: 100%;
    text-align: center;
    font-size: 0.8rem;
    color: var(--color-text-grey);
    line-height: 1.5;
    
    /* --- The Simplest, Most Reliable Fix --- */
    white-space: normal; /* Ensures text will wrap as expected */
}

.savings-notice strong {
    color: var(--color-green-success);
    font-weight: 600;
}

/* Remove flex-direction from the main footer on mobile,
   as the new group now handles the layout. */
@media (max-width: 767px) {
    #cartFooter {
        /* No longer need flex-direction: column here */
        padding-bottom: 15px !important;
        height: auto;
    }
}

/* ==========================================================================
   Contact Page
   ========================================================================== */

.contact-container { 
  width: 100%; 
  max-width: 650px; 
  margin: 0 auto; 
  padding: 30px 40px; 
  background-color: var(--color-white); 
  border-radius: var(--border-radius-calc); 
  box-shadow: var(--shadow-soft); 
  transition: var(--transition-smooth);
  position: relative;
}
.contact-form h2 { font-size: 1.75rem; font-weight: 500; text-align: center; margin-bottom: 15px; color: var(--color-text-dark); }
.form-steps { text-align: center; margin-bottom: 35px; color: var(--color-text-grey); font-size: 0.95rem; line-height: 1.5; padding: 0 10px; }
.form-steps ol { list-style: none; padding: 0; margin: 0; display: inline-block; text-align: left; }
.form-steps li { counter-increment: step-counter; margin-bottom: 8px; position: relative; padding-left: 30px; }
.form-steps li::before { content: counter(step-counter); position: absolute; left: 0; top: 0; width: 20px; height: 20px; background-color: var(--color-primary-blue); color: var(--color-white); border-radius: 50%; font-size: 0.8rem; font-weight: bold; display: flex; align-items: center; justify-content: center; line-height: 1; }

/* Form Group (Material Inspired) */
.form-group { position: relative; margin-bottom: 25px; }
.form-group label { position: absolute; top: 50%; left: var(--input-padding-x); transform: translateY(-50%); color: var(--color-text-grey); font-size: var(--input-font-size); pointer-events: none; transition: all 0.2s ease-out; background-color: var(--color-white); padding: 0 4px; }
/* --- (6a) Mandatory Field Indicator --- */
.form-group input:required + label::after,
.form-group textarea:required + label::after {
  content: ' *'; color: var(--color-red-error); font-size: 1em; /* Adjust size relative to label */
  /* Position slightly after label text */
  position: relative; top: -0.1em; /* Adjust vertical alignment if needed */
}
.form-group input, .form-group textarea { width: 100%; padding: var(--input-padding-y) var(--input-padding-x); font-size: var(--input-font-size); border: 1px solid var(--color-border-medium); border-radius: var(--border-radius-standard); background-color: var(--color-white); color: var(--color-text-dark); transition: border-color 0.2s ease-out; appearance: none; -webkit-appearance: none; }
.form-group textarea { resize: vertical; min-height: 80px; padding-top: calc(var(--input-padding-y) + 4px); }
.form-group.has-error label { color: var(--color-red-error); }
.form-group.has-error input, .form-group.has-error textarea { border-color: var(--color-red-error); }
.form-group.has-error input:focus, .form-group.has-error textarea:focus { border-color: var(--color-red-error); box-shadow: 0 0 0 1px var(--color-red-error); }
.form-group.has-error input:not(:focus):not(:placeholder-shown) + label, .form-group.has-error textarea:not(:focus):not(:placeholder-shown) + label { color: var(--color-red-error); }
.form-group .validation-message { display: none; color: var(--color-red-error); font-size: var(--font-size-xsmall); margin-top: 4px; padding-left: var(--input-padding-x); }
.form-group.has-error .validation-message { display: block; }
.form-group input:focus + label, .form-group input:not(:placeholder-shown) + label, .form-group textarea:focus + label, .form-group textarea:not(:placeholder-shown) + label { top: 0; transform: translateY(-50%) scale(0.8); font-size: 0.8rem; color: var(--color-primary-blue); }
.form-group.has-error input:focus + label, .form-group.has-error textarea:focus + label { color: var(--color-red-error); }
.form-group textarea + label { top: calc(var(--input-padding-y) + 4px); }
.form-group textarea:focus + label, .form-group textarea:not(:placeholder-shown) + label { top: 0; transform: translateY(-50%) scale(0.8); }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--color-primary-blue); box-shadow: 0 0 0 1px var(--color-primary-blue); }
.form-group.has-error input:focus, .form-group.has-error textarea:focus { border-color: var(--color-red-error); box-shadow: 0 0 0 1px var(--color-red-error); }
.form-group input::placeholder, .form-group textarea::placeholder { color: transparent; }
.form-check { display: flex; align-items: flex-start; margin-bottom: 10px; position: relative; padding-top: 5px; }
.form-check input[type="checkbox"] { width: 18px; height: 18px; margin-right: 10px; margin-top: 2px; accent-color: var(--color-primary-blue); cursor: pointer; flex-shrink: 0; }
.form-check label { font-size: 0.9rem; color: var(--color-text-grey); line-height: 1.4; cursor: pointer; }
/* --- (6a) Mandatory Field Indicator for Checkbox --- */
.form-check input[type="checkbox"]:required + label::after {
  content: ' *'; color: var(--color-red-error); font-size: 1em; position: relative; top: -0.1em;
}
.form-check label a { color: var(--color-primary-blue); text-decoration: none; }
.form-check label a:hover { text-decoration: underline; }
.terms-error-message { color: var(--color-red-error); font-size: var(--font-size-xsmall); margin-top: 4px; text-align: center; display: none; }
.form-check.has-error label { color: var(--color-text-dark); }
.form-check.has-error input[type="checkbox"] { outline: 1px solid var(--color-red-error); }
.form-check.has-error .terms-error-message { display: block; }
.contact-form .button-group { margin-top: 30px; display: flex; flex-direction: column; gap: 15px; }
.contact-form button { width: 100%; }

/* ==========================================================================
   Shared Components: Buttons
   ========================================================================== */

.btn { padding: 10px 24px; border: none; border-radius: var(--border-radius-standard); font-size: 0.9rem; font-weight: 500; cursor: pointer; transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s ease, opacity 0.2s; text-align: center; text-decoration: none; display: inline-block; letter-spacing: 0.02em; text-transform: uppercase; line-height: normal; vertical-align: middle; }
.btn:active { transform: scale(0.98); }
.btn:disabled { cursor: not-allowed; }
.btn-primary { background-color: var(--color-green-success); color: var(--color-white); box-shadow: 0 1px 2px 0 rgba(66,133,244,.3), 0 1px 3px 1px rgba(66,133,244,.15); border: none; }
.btn-primary:hover { background-color: var(--color-green-dark); box-shadow: 0 1px 2px 0 rgba(66,133,244,.3), 0 3px 6px 2px rgba(66,133,244,.15); }
.btn-primary:disabled { background-color: var(--color-primary-blue); opacity: 0.65; box-shadow: none; }
.calc-navigation .btn-primary { background-color: var(--color-green-success); color: var(--color-white); box-shadow: 0 4px 10px rgba(40, 167, 69, 0.3); border: none; }
.calc-navigation .btn-primary:hover { background-color: var(--color-green-dark); box-shadow: 0 6px 12px rgba(40, 167, 69, 0.4); }
.calc-navigation .btn-primary:disabled { background-color: var(--color-green-success); opacity: 0.65; box-shadow: none; }
.btn-secondary { background-color: var(--color-white); color: var(--color-primary-blue); border: 1px solid var(--color-border-medium); box-shadow: 0 1px 2px 0 rgba(60,64,67,.3), 0 1px 3px 1px rgba(60,64,67,.15); }
.btn-secondary:hover { background-color: var(--color-hover-light-blue); border-color: var(--color-border-medium); }
.btn-secondary:disabled { background-color: var(--color-white); color: var(--color-text-light); border-color: var(--color-border-light); opacity: 0.7; box-shadow: none; }
.calc-navigation .btn-secondary { background-color: var(--color-grey-secondary); color: var(--color-text-dark); border: none; box-shadow: none; }
.calc-navigation .btn-secondary:hover { background-color: var(--color-grey-dark); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.calc-navigation .btn-secondary:disabled { background-color: var(--color-grey-secondary); color: var(--color-text-light); opacity: 0.7; box-shadow: none; }
#page-thankyou .button-group, .contact-form .button-group { margin-top: 30px; display: flex; flex-direction: column; gap: 15px; align-items: center; }
#page-thankyou .btn, .contact-form .btn { width: auto; min-width: 200px; max-width: 300px; }
.calc-navigation .btn { max-width: 300px; width: 100%; }


/*
 * Custom Focus Styles for Better Accessibility and Consistent Design
 *
 * We use :focus-visible to apply focus styles only for keyboard users,
 * not for mouse clicks, which is the modern standard.
*/

/* Custom focus style for all primary and secondary buttons */
.btn:focus-visible, 
#overlay-select-btn:focus-visible, 
#overlay-streetview-btn:focus-visible {
    /* Remove the browser's default, sometimes ugly, outline */
    outline: none;
    
    /* Apply a custom, branded 'box-shadow' ring that looks like a clean border */
    /* This creates a 2px blue ring around the focused element */
    box-shadow: 0 0 0 2px var(--color-white), 0 0 0 4px var(--color-primary-blue);
}

/* A specific style for the text-based Street View button to ensure contrast */
#overlay-streetview-btn:focus-visible {
    border-color: var(--color-primary-blue);
    background-color: var(--color-hover-light-blue);
}


/* ==========================================================================
   Shared Components: Modal
   ========================================================================== */

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    display: block;
    opacity: 1;
    visibility: visible;
}

.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    max-width: 90%;
    width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--color-border-light);
}

.modal-header h3 {
    margin: 0;
    color: var(--color-text-dark);
    font-size: 1.2rem;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body iframe {
    width: 100%;
    height: 500px;
    border: none;
    background: #fff;
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid var(--color-border-light);
}

.modal-accept-btn {
    background-color: var(--color-green-success);
    color: var(--color-white);
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius-standard);
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.modal-accept-btn:hover {
    background-color: var(--color-green-dark);
}

.close-modal-btn {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: var(--color-text-grey);
    font-size: 1.5rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.close-modal-btn:hover {
    color: var(--color-text-dark);
}

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-body iframe {
        height: 400px;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

/* Desktop Layout (and larger tablets) */
@media (min-width: 768px) {
  .map-list-container { flex-direction: row; height: calc(100% - 71px); }
  #map, #list { display: block; width: 50%; height: 100%; border-right: 1px solid var(--color-border-medium); overflow-y: auto; }
  #list { border-right: none; }
  .toggle-button { display: none; }
  #map-info-overlay { display: none !important; }
  .calculator-body { flex-direction: row; }
  .sidebar-details { flex-basis: 280px; flex-shrink: 0; }
  .details-summary { height: auto; min-height: 300px; margin-bottom: 0;}
  .calculator-formula { margin-top: 0; }
  
  /* Center calculator container on desktop */
  .calculator-container { 
    margin: 40px auto; 
    max-width: 1000px;
    /* Add some breathing room on sides */
    width: calc(100% - 40px);
  }
}

/* Smaller Devices (Mobile & small tablets) */
@media (max-width: 767px) {
  .search-box-wrapper {
    display: inline-flex ;
    justify-content: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
 
}
.search-box {
  position: relative;
 
   min-width: auto;
}
    .search-options { justify-content: space-between; }
    .search-options select { flex-grow: 1; }
    .details-summary { margin-bottom: 0px; height: auto; }
    .calculator-formula { margin-top: 30px; }
    /* --- (4) Contact Page Mobile Layout --- */
    #page-contact { padding: 20px 15px; } /* Reduced padding */
    .contact-container { margin: 0 auto; } /* Ensure it's centered if page padding is removed */
 

  body { padding: 0; }
  .page-container {
 
    overflow: auto;
    overflow-x: hidden;
}
  .fixed-header { height: 50px; padding: 0 15px; }
  .fixed-header .logo { font-size: 1.3rem; }
  .fixed-header .cart .material-symbols-outlined { font-size: 24px; margin-right: 5px; }
  .fixed-header .cart .price { font-size: 0.9rem; min-width: 70px; }
  .search-container { padding: 10px 15px 10px 15px !important; }
  .map-selection-container { padding: 0px 15px 0px 15px;  }
  .search-box input[type="text"] { padding: 10px 15px 10px 30px; font-size: 0.9rem; height: 40px; }
  .search-box .search-icon { left: 12px; width: 18px; height: 18px; }
  .search-options select { height: 40px; padding: 8px 25px 8px 8px; background-position: right 5px center; font-size: 0.85rem;}
  .search-options .search-submit-btn { height: 40px; padding: 0 15px; font-size: 0.85rem; }
  .map-list-container { height: calc(100% - (height of search-container)); }
  .list-item { padding: 12px 15px 12px 45px; padding-right: 15px; }
  .list-item.selected { padding-left: 41px; }
  .location-checkbox { left: 12px; top: 15px; }
  .list-item-id { font-size: 0.9rem; }
  .list-item-address { font-size: var(--font-size-xsmall); }
  .list-item-actions { padding-left: 30px; }
  .list-item-select-btn, .list-item-cart-btn, .list-item-streetview-btn { font-size: 0.75rem; padding: 3px 8px; min-width: 70px; }
  .toggle-button { width: 48px; height: 48px; bottom: 20px; }
  .toggle-button svg { width: 20px; height: 20px; }
  #map-info-overlay { padding: 12px; padding-right: 30px; }
  .close-overlay-btn { font-size: 1.3rem; }
  .overlay-content h4 { font-size: 0.9rem; }
  .overlay-content p { font-size: var(--font-size-xsmall); }
    .calculator-container {
        padding: 20px;
        margin: 10px auto 10px auto;
    } 
  body.calculator-body-padding { padding: 10px; }
  .input-wrapper { flex-direction: row; gap: 10px;  }
  .calculator-title { font-size: 1.5rem; padding-left: 40px; padding-right: 40px; }
  .back-icon-btn .material-symbols-outlined { font-size: 1.5rem; }
  .result-monthly { font-size: 1.5rem; }
  .result-daily { font-size: 1rem; }
  .selected-billboards-section { padding: 10px; }
  #selected-billboards-list { max-height: 100px; }
  .selected-item { font-size: var(--font-size-xsmall); padding: 3px 6px 3px 8px;}
  .remove-item-btn { font-size: 1rem; margin-left: 4px;}
  .contact-form h2 { font-size: 1.5rem; }
  .form-steps { font-size: 0.9rem; }
  #page-thankyou h2 { font-size: 1.6rem; }
  #page-thankyou p { font-size: 0.95rem; }
  .btn { max-width: 100%; font-size: 0.9rem; padding: 10px 20px; }
  .calc-navigation .btn { max-width: 100%; }
  #page-thankyou .btn, .contact-form .btn { max-width: 90%; min-width: 180px;}
  .modal-content { padding: 20px; width: 95%; }
  .modal-header h2 { font-size: 1.2rem; }
}

/* End Responsive */

/* Add marker transition styles */
.marker-transition {
  transition: all var(--marker-transition-duration) var(--marker-transition-timing);
}

.list-selected-counter {
  background-color: var(--color-hover-light-blue);
  padding: 12px 20px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--color-text-dark);
  border-bottom: 1px solid var(--color-border-light);
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
  opacity: 0;
  visibility: hidden;
  max-height: 0;
  padding: 0;
  transition: all 0.3s ease-in-out;
  overflow: hidden;
}

.list-selected-counter.visible {
  opacity: 1;
  visibility: visible;
  max-height: 50px;
  padding: 12px 20px;
}

.list-selected-counter .count {
  color: var(--color-primary);
  font-weight: 600;
}

.list-selected-counter .clear-selection {
  color: var(--color-red-error);
  font-size: 0.85rem;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

.list-selected-counter .clear-selection:hover {
  opacity: 1;
}

@media (max-width: 767px) {
  .list-selected-counter.visible {
      padding: 10px 15px;
      font-size: 0.85rem;
  }
  
  .list-selected-counter .clear-selection {
      font-size: 0.8rem;
  }
}

/* Confirmation Modal */
.confirmation-modal {
  display: none;
  position: fixed;
  z-index: 1200;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.confirmation-modal.show {
  display: flex;
  opacity: 1;
}

.confirmation-modal-content {
  background-color: var(--color-white);
  padding: 25px;
  border-radius: var(--border-radius-large);
  max-width: 400px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-modal);
  transform: translateY(20px);
  transition: transform 0.2s ease-out;
}

.confirmation-modal.show .confirmation-modal-content {
  transform: translateY(0);
}

.confirmation-modal-message {
  color: var(--color-text-dark);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 20px;
  text-align: center;
}

.confirmation-modal-buttons {
  display: flex;
  justify-content: center;
  gap: 15px;
}

.confirmation-modal-buttons button {
  min-width: 100px;
  padding: 8px 20px;
}
 
@media (max-width: 480px) {
  .confirmation-modal-content {
    padding: 20px;
  }

  .confirmation-modal-buttons {
    flex-direction: column;
  }

  .confirmation-modal-buttons button {
    width: 100%;
  }
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--color-grey-secondary) !important;
  color: var(--color-text-grey);
  border: none;
  border-radius: var(--border-radius-standard);
  font-size: 0.9rem;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
  visibility: visible;
  opacity: 1;
}

.share-btn:hover {
  background-color: var(--color-primary-dark);
  transform: scale(1.02);
  visibility: visible;
  opacity: 1;
}

.share-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
  visibility: visible;
  opacity: 1;
}

.view-options {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px;
  justify-content: center;
  visibility: visible;
}
 
.sticky-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 60px;
    background-color: var(--color-white);
    box-shadow: var(--shadow-subtle);
    z-index: 9990;
    border-top: 1px solid var(--color-border-medium);
    
    /* Layout */
    display: flex !important; /* Force display on all devices */
    align-items: center;
    justify-content: space-around;
    padding: 12px 16px;
    
    /* Transition Setup */
    transform: translateY(100%);
    transition: transform 0.3s var(--transition-timing),
                opacity 0.2s var(--transition-timing),
                visibility 0.2s var(--transition-timing);
    opacity: 0;
    visibility: hidden;
    
    /* Performance Optimizations */
    will-change: transform, opacity, visibility;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Show footer when visible class is added */
.sticky-footer.visible {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Footer Content Layout */
.sticky-footer .cart {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sticky-footer .material-symbols-outlined {
    font-size: 24px;
    color: var(--color-text-grey);
}

.sticky-footer .price {
    font-size: 1rem;
    color: var(--color-text-grey);
    font-weight: 500;
}

/* Footer Button Styles */
.sticky-footer .btn {
    padding: 11px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: 140px;
    background-color: var(--color-green-success);
    color: var(--color-white);
    transition: background-color 0.2s ease;
}

.sticky-footer .btn:hover {
    background-color: var(--color-green-dark);
}

/* Ensure content area has space for footer on all devices */
/* Footer positioning is handled by page-container height calculation */

/* Page-specific Footer Adjustments */
#homeFooter.sticky-footer,
#cartFooter.sticky-footer,
#contactFooter.sticky-footer,
#thankyouFooter.sticky-footer {
    /* Ensure visibility on all pages when needed */
    display: flex !important;
}

.footer-navigation .btn-secondary{
  color: var(--color-text-dark);
  background-color: var(--color-grey-secondary);
  box-shadow: none;
}

.footer-navigation .btn-secondary:hover{
  color: #fff;
  background-color: #222;
  box-shadow: none;
}

@media (max-width: 768px) {
  .sticky-footer {
    justify-content: space-between;
  }
  
  .contact-container {
    margin: 0 auto;
    padding: 30px 20px;
  }
  .page-container:has(#page-home) {
   margin-top:10px;
 height: auto;
  }
  #page-cart {
    padding: 130px 10px 20px 10px;
    /* min-height: fit-content; */
  }
  

}

@media (max-width: 480px) {
  .form-check {
    margin: auto;
    width: 325px;
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    position: relative;
    padding-top: 0px;
    justify-content: center;
    flex-direction: row;
    flex-wrap: nowrap;
}
}

/* Search Guide Tip Styles */
.search-guide-tip {
    flex: 1;
    text-align: center;
    padding: 0 16px;
}

.search-guide-tip p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-grey);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .search-guide-tip {
        padding: 0 12px;
    }
    
    .search-guide-tip p {
        font-size: 0.85rem;
    }
}

/* ==========================================================================
   Mobile Scroll Fix - Eliminate Overlapping Scrolls (Revised)
   ========================================================================== */

/* Base body scroll prevention on mobile */
@media (max-width: 768px) {
  body {
    padding: 0;
    margin: 0;
    /* Prevent elastic scrolling on iOS */
    overscroll-behavior: none;
    /* Prevent zoom on touch */
    touch-action: manipulation;
    /* Create full viewport container */
    width: 100%;
    height: 100vh;
  
  }

  /* Page container - relative positioning for flexibility */
  .page-container {
    position: relative;
    width: 100%;
 
    /* Remove default margins and enable scroll control */
    margin: 0;
 
  }

  /* Individual pages - controlled overflow */
  .page {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Page-level scroll control */
    overflow: hidden;
    /* Smooth transitions */
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
  }

  /* Home page specific - flexbox layout */
  #page-home {
    display: flex ;
            margin-top: 48px;
            overflow: hidden !important;
            flex-direction: column;
  }

  /* Search container - fixed section at top */
  .search-container {
    flex-shrink: 0;
    position: relative;
    z-index: 10;
    width: 100%;
  }

  /* Map selection container - fixed section */
  .map-selection-container {
    flex-shrink: 0;
    position: relative;
    z-index: 9;
    width: 100%;
  }

  /* Map/List container - flexible content area */
  .map-list-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0; /* Important for flex children */
  }

  /* Map and List - absolute positioning within container */
  #map, #list {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: none;
  }

  #map.active, #list.active {
    display: block;
  }

  /* List specific - enable vertical scrolling only */
  #list.active {
    overflow-y: auto;
    overflow-x: hidden;
    /* Smooth touch scrolling */
    -webkit-overflow-scrolling: touch;
    /* Prevent overscroll bounce */
    overscroll-behavior: contain;
  }

  /* Cart page - scrollable content */
  #page-cart {
    display: flex;
 
            align-items: center;
            justify-content: flex-start;
    padding: 20px 10px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    height: 100%;
  }


  /* Thank you page - centered with scroll if needed */
  #page-thankyou {
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px 20px;
  }

  /* Footer - stays fixed at bottom */
  .sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }

  /* Map - allow dynamic height setting */
  #map {
    min-height: 250px; /* Fallback minimum */
  }

  /* Modal improvements */
  .modal {
    overscroll-behavior: contain;
  }

  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Very small devices - header adjustment */
@media (max-width: 600px) {
 

  /* Ensure proper touch interactions */
  .list-item {
    touch-action: manipulation;
  }

 
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  .page-container {
    height: calc(100vh - 50px);
    margin-top: 50px; /* Smaller header in landscape */
  }
  
  #map {
    min-height: calc(100vh - 150px);
  }
}

/* Touch device optimizations */
@media (pointer: coarse) {
  .list-item,
  .btn,
  .toggle-button,
  input,
  textarea,
  select {
    touch-action: manipulation;
  }
}

/* Mobile Scroll Fix Overrides - Final precedence */
@media (max-width: 768px) {
  /* Ensure body behavior */
  body {
    padding: 0 !important;
    margin: 0 !important;
    
  }

  

  /* Page-level overflow control */
  .page {
    overflow: hidden !important;
  }

  /* Specific page overrides */
  #page-cart {
    padding: 40px 10px 40px 10px !important;
    
    overflow-y: auto !important;
    overflow-x: hidden !important;
    
    align-items: center;
    justify-content: flex-start;
}

  #page-contact {
    padding: 20px 10px 0px 10px !important;
    height: 100%;
    margin-top: 45px;
    overflow-y: auto !important;
    overflow-x: hidden !important;
 
 
  }

  /* Map/List container control */
  .map-list-container {
    flex: 1 !important;
    overflow: hidden !important;
  }

  /* List scrolling */
  #list {
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }

  /* Map - no scroll */
  #map {
    overflow: hidden !important;
  }

  /* Footer positioning */
  .sticky-footer {
    position: fixed !important;
    bottom: 0 !important;
  }

/* 
@media (max-width: 420px) {
  #page-cart {
    font-size: 10px;
  }
}

#page-cart .calculator-title {
font-size: 16px; /\---------------- Previously 1rem ----------------------\/
}
}
 */
html {
            -webkit-text-size-adjust: none;
            -ms-text-size-adjust: none;
            text-size-adjust: none;
        }

}
 
 /* ==========================================================================
   Mobile-Only Search Bar Styles
   ========================================================================== */

/* By default, hide the mobile search on desktop */
.mobile-search-container {
    display: none;
}

@media (max-width: 767px) {
    /* Hide the original search on mobile devices */
    .search-container {
        display: none !important;
    }

    /* Show and style the new mobile search */
    .mobile-search-container {
        display: flex;
        background-color: var(--color-white);
        padding: 10px 15px;
        border-bottom: 1px solid var(--color-border-medium);
    }
    .mobile-search-box {
        position: relative;
        width: 100%;
    }
    .mobile-search-icon {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        fill: var(--color-text-grey);
        z-index: 1;
    }
    #mobileZipCodeSearch {
        width: 100%;
        height: 44px;
        padding: 10px 20px 10px 45px; /* Left padding for the icon */
        font-size: 1rem;
        border: 1px solid var(--color-border-medium);
        border-radius: var(--border-radius-pill); /* Rounded "pill" shape */
        background-color: var(--color-background-light);
        outline: none;
        transition: all 0.2s ease-in-out;
        -webkit-appearance: none;
    }
    #mobileZipCodeSearch:focus {
        border-color: var(--color-primary-blue);
        background-color: var(--color-white);
        box-shadow: 0 0 0 2px var(--color-hover-medium-blue);
    }
}

 
 
/* End Mobile Scroll Fix */



@media (max-width: 767px) {
  .investment-result {
  word-break: break-word;
  overflow-wrap: break-word;
    white-space:wrap;
}
#impressions-summary{
  word-break: break-word;
  overflow-wrap: break-word;
   white-space:wrap;
display:flex;
flex-direction:column;
}
       .sidebar-details ul {
        max-width: 100%;
        min-width: 0;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        display: flex
;
        flex-direction: column;
        flex-wrap: wrap;
        box-sizing: border-box;
        flex-shrink: 1;
    }
    .sidebar-details li {
        max-width: 100%;
        min-width: 0;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        display: block;
        box-sizing: border-box;
    
    }
#homeFooter button{
    white-space: normal;
word-break: break-word;
text-align: center;
}
#page-cart .page-footer, #page-contact .page-footer{
justify-content:center;
}
}

/* ========================================================================== Calculator Page (Inside Iframe) ========================================================================== */ section.

.investment-result {
    padding: 20px;
}
.result-main-price {
    margin-bottom: 20px;
}
.price-breakdown {
    border-top: 1px solid #e0d6f5;
    padding-top: 15px;
}
.breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #f9f1fc; /* Very light separator */
}
.breakdown-row:last-child {
    border-bottom: none;
}
.breakdown-label {
    color: var(--color-text-grey);
    display: flex;
    align-items: center;
}
.breakdown-label .tooltip-icon {
    margin-left: 3px;
}

.tooltip-wrapper {
  display: inline-block;
  white-space: nowrap;
}


.breakdown-value {
    font-weight: 600;
    color: var(--color-text-dark);
    white-space: nowrap;
}
.discount-value {
    color: var(--color-green-success);
}
.savings-row {
    background-color: #e8f5e9;
    color: #1b5e20;
    margin: 10px -20px -20px -20px; /* Extend to edges of parent */
    padding: 12px 20px;
    border-bottom-left-radius: var(--border-radius-calc);
    border-bottom-right-radius: var(--border-radius-calc);
}
.savings-row .breakdown-label,
.savings-row .breakdown-value {
    color: #1b5e20;
    font-size: 1rem;
    font-weight: 700;
}

/* ==========================================================================
   Mobile-Only Search Bar Styles
   ========================================================================== */

/* By default, hide the mobile search on desktop */
.mobile-search-container {
    display: none;
}

@media (max-width: 767px) {
    /* Hide the original desktop search container on mobile */
    .search-container {
        display: none !important;
    }

    /* Show and style the new mobile search container */
    .mobile-search-container {
        display: flex; /* Use flexbox for alignment */
        align-items: center; /* Vertically center items */
        gap: 10px; /* Space between input and radius selector */
        background-color: var(--color-white);
        padding: 10px 15px;
        border-bottom: 1px solid var(--color-border-medium);
        width: 100%;
        box-sizing: border-box; /* Ensures padding is included in the width */
    }

    /* Flex container for the search input and icon */
    .mobile-search-box {
        position: relative;
        flex-grow: 1; /* Allows the search box to take up remaining space */
        min-width: 0; /* Prevents overflow issues in flexbox */
    }

    .mobile-search-icon {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        width: 20px;
        height: 20px;
        fill: var(--color-text-grey);
        z-index: 1;
        pointer-events: none; /* Icon does not block clicks on the input */
    }

    #mobileZipCodeSearch {
        width: 100%;
        height: 44px;
        padding: 10px 20px 10px 45px; /* Left padding for the icon */
        font-size: 1rem;
        border: 1px solid var(--color-border-medium);
        border-radius: var(--border-radius-pill);
        background-color: var(--color-background-light);
        outline: none;
        transition: all 0.2s ease-in-out;
        -webkit-appearance: none; /* Removes default iOS styling */
        box-sizing: border-box; /* Ensures padding is included in the width */
    }

    #mobileZipCodeSearch:focus {
        border-color: var(--color-primary-blue);
        background-color: var(--color-white);
        box-shadow: 0 0 0 2px var(--color-hover-medium-blue);
    }
    
    /* Container for the radius dropdown */
    .mobile-radius-selector {
        flex-shrink: 0; /* Prevents the selector from shrinking */
    }
    
    /* Styling the mobile radius dropdown */
    #mobileSearchRange {
        height: 44px;
        padding: 8px 30px 8px 12px; /* Consistent height with search input */
        border: 1px solid var(--color-border-medium);
        border-radius: var(--border-radius-standard);
        background-color: var(--color-white);
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url('data:image/svg+xml;utf8,<svg fill="%235f6368" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
        background-repeat: no-repeat;
        background-position: right 8px center;
        background-size: 20px;
        cursor: pointer;
    }
}


/*
  Styles for the new mobile search form elements to ensure proper layout and appearance.
*/

/* This new class was added to the <form> element in the HTML. */
/* It uses flexbox to align all items (input, select, button) in a row. */
.mobile-search-form {
    display: flex;
    align-items: center;
    gap: 10px; /* Provides spacing between elements */
    width: 100%;
}

/* The input field now needs to be able to grow to fill available space. */
.mobile-search-form .mobile-search-box {
    flex-grow: 1; /* Allows the input field to take up remaining horizontal space */
}

/* Style the new submit button */
.mobile-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    width: 44px;  /* Match the height of the input for a circular button */
    height: 44px;
    border: none;
    border-radius: 50%; /* Makes it a circle */
    background-color: var(--color-primary-blue);
    color: var(--color-white);
    cursor: pointer;
    flex-shrink: 0; /* Prevents the button from shrinking */
    transition: background-color 0.2s ease;
}

.mobile-search-submit:hover {
    background-color: var(--color-primary-blue-dark);
}

.mobile-search-submit .material-symbols-outlined {
    font-size: 24px;
}