@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Noto+Sans+KR:wght@100..900&family=Noto+Sans+Mono:wght@100..900&family=Whisper&display=swap');/* Disable Scroll on Body */
.no-scroll {
  overflow: hidden !important;
  height: 100vh !important;
  touch-action: none; /* Disable touch scroll on mobile */
}

/* About Gallery Widget */
.about-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.about-gallery-widget {
    margin-top: 0;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    max-width: 60%;
}

.about-text{
  max-height:-webkit-fill-available;
  overflow-y: auto;
  height: 100%;
  padding-bottom: 60px;
}

@media (min-width: 769px) {
    .about-grid {
        display: flex;
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        align-items: start;
        flex-direction: row;
        height: 100%;
        max-height: calc(100vh - 200px);
    }
    
    .about-gallery-widget {
        border-top: none;
        padding-top: 0;
    }
}

.about-gallery-widget h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-main);
}

.about-slider-container {
    position: relative;
    width: 100%;
    height: -webkit-fill-available;
    max-height: 50vh;
    border-radius: 12px;
    overflow: hidden;
}

.about-slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-out;
}

.about-slider-track img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    flex-shrink: 0;
    cursor: grab;
}

.about-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgb(147 147 147 / 70%);
    color: #fff;
    border: none;
    font-size: 16px;
    padding: 4px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.about-nav:hover {
}

.about-nav.prev { left: 10px; }
.about-nav.next { right: 10px; }

.about-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.about-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.about-dots .dot.active {
    background: var(--accent);
}

.contact-slider {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
}

.contact-slider-track {
    display: flex;
    width: 100%;
    transition: transform 0.3s ease-out;
    overflow: hidden;
}

.contact-slider-track .contact-card {
    flex: 0 0 100%;
    max-width: 100%;
}

.contact-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgb(147 147 147 / 70%);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.contact-nav.prev { left: 6px; }
.contact-nav.next { right: 6px; }

.contact-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.contact-dots .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border);
    cursor: pointer;
    transition: background 0.2s;
}

.contact-dots .dot.active {
    background: var(--accent);
}

/* Mobile optimizations for slider */
@media (max-width: 768px) {
    .about-slider-container {
        height: -webkit-fill-available;
    }
  .about-gallery-widget{
    max-width:-webkit-fill-available;
  }
  .about-text{
    padding-bottom:0;
  }
}

:root {
  --font-sans: "Inter", sans-serif;
  --color-secondary: #64748b;
  --bg-dark: #f1f5f9;
  --bg-panel: #ffffff;
  --bg-lighter: #e2e8f0;
  --accent: #0051ff;
  --accent-dim: rgba(0, 81, 255, 0.1);
  --accent-dim-2: rgb(0 81 255 / 50%);
  --text-main: #1e293b;
  --text-muted: #64748b;
  --text-secondary: #fff;
  --color-muted: #94a3b8;
  --color-accent: #0051ff;
  --border: #cbd5e1;
  --danger: #ef4444;
  --warning: #f59e0b;
  --danger-bg: #fee2e2;
  --danger-text: #ef4444;
  --danger-border: #fecaca;
  --success-bg: #dcfce7;
  --success-text: #16a34a;
  --success-border: #bbf7d0;
  --font-mono: 'Courier New', monospace;
  --font-ui: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --text-primary: #0f172a;
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --border-color: #cbd5e1;
  --accent-primary: #e2e8f0;
  --accent-secondary: #0051ff;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
  --dashboard-card-bg-start: #ffffff;
  --dashboard-card-bg-end: #f8fafc;
  --dashboard-card-border: #cbd5e1;
  --dashboard-grid-line: #f1f5f9;
  --dashboard-tooltip-bg: #ffffff;
  --dashboard-tooltip-text: #1e293b;
  --dashboard-tooltip-border: #dddddd;
  --dashboard-tooltip-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  --node-color-question: #2563eb;
  --node-color-data: #059669;
  --node-color-completion: #7c3aed;
  --node-color-conditional: #d97706;
  --node-color-default: #475569;
}

.mobile-only {
  display: none !important;
}

.hidden {
    display: none !important;
}

.desktop-only {
    display: block !important;
}

@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: radial-gradient(circle, var(--bg-tertiary) 0%, var(--bg-dark) 100%);
  color: var(--text-main);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 20px;
  background: transparent;
  border-bottom: solid 1px var(--border);
  height: 64px;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  max-width: 300px;
}

.brand img {
  height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.search-box {
  flex: 1;
  max-width: 600px;
  min-width: 200px;
}

.search-box input {
  width: 100%;
  height: 40px;
  border-radius: 26px;
  border: 1px solid var(--border);
  padding: 0 12px;
  background: var(--bg-lighter);
  font-size: 16px;
  outline: none;
}

.main-nav {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 26px;
  text-decoration: none;
  font-weight: 600;
  background: var(--bg-dark);
  color: var(--text-main);
  border: 1px solid var(--border);
  transition: all ease .5s;
}

.nav-link:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.page {
  padding: 16px;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.cockpit {
  display: grid;
  grid-template-columns: max(430px, 30vw) 1fr;
  gap: 16px;
  height: 100%;
}

.left-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.list-panel {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  z-index: 10;
  min-height: 0;
}

.custom-price-marker {
  border: none;
}

.price-tag {
  background: var(--bg-panel);
  color: var(--accent);
  padding: 4px 8px;
  border-radius: 26px;
  font-weight: 700;
  font-size: 12px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  white-space: nowrap;
  display: inline-block;
  border: solid 1px var(--border);
  transition: transform 0.2s, z-index 0.2s;
  position: relative;
  font-family: var(--font-sans);
}

.price-tag::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid var(--primary);
}

.custom-price-marker:hover .price-tag {
  transform: scale(1.1);
  z-index: 1000;
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.custom-price-marker:hover .price-tag::after {
  border-top-color: var(--primary);
}

.leaflet-container {
}

.map-panel {
  position: relative;
}

.draw-banner {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #333;
  padding: 12px 24px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.5);
  z-index: 2000;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.draw-banner.hidden {
  display: none;
}

.btn-text {
  background: transparent;
  border: none;
  font-weight: 700;
  cursor: pointer;
  font-size: 12px;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  font-family: var(--font-sans);
}

.btn-text:hover {
  text-decoration: underline;
}

.btn-text.confirm {
  background: var(--accent);
  color: #fff;
  padding: 8px 16px;
  border-radius: 26px;
  box-shadow: var(--shadow-sm);
}

.btn-text.confirm:hover {
  background: #0056b3;
  text-decoration: none;
  transform: translateY(-1px);
}

.draw-controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
}

.pill-draw {
  background: var(--accent-dim-2);
  color: var(--text-secondary);
  border: none;
  padding: 10px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform 0.2s;
  font-family: var(--font-sans);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  will-change: blur;
}

.pill-draw:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.map.drawing-mode {
  cursor: crosshair;
}

/* Draw vertices for map polygon editing */
.draw-vertex,
.draw-vertex-edit {
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid var(--accent);
  border-radius: 50%;
  box-sizing: border-box;
  display: block;
}
.draw-vertex {
  width: 10px;
  height: 10px;
}
.draw-vertex-edit {
  cursor: grab;
}

.custom-preview-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--bg-dark);
  font-family: var(--font-sans);
}

.custom-preview-popup .leaflet-popup-content {
  margin: 0;
  width: 280px !important;
}

.custom-preview-popup .leaflet-popup-tip {
  background: var(--bg-dark);
  border-radius: 3px;
}

.preview-card {
  display: flex;
  flex-direction: column;
}

.preview-image-container {
  position: relative;
  height: 160px;
  background: var(--bg-dark);
  border-bottom: solid 1px var(--border);
}

.preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-info {
  padding: 12px;
}

.preview-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
}

.preview-meta {
  display: flex;
  gap: 12px;
  color: var(--text-main);
  font-size: 13px;
  margin-bottom: 12px;
}

.preview-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.leaflet-control-attribution {
  display: none !important;
}

.legal-footer {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  flex-shrink: 0;
}

.legal-branding {
  display: flex;
  align-items: center;
  gap: 0;
  justify-content: center;
  text-decoration: none;
  font-family: 'Whisper';
  font-size: 20px;
  font-style: normal;
  font-weight: 400;
  -webkit-text-stroke-width: 0.5px;
  -webkit-text-stroke-color: var(--accent);
  paint-order: stroke fill;
}

.legal-branding:hover {
  color: var(--primary);
}

.legal-branding img {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  object-fit: cover;
}

.legal-branding .brand {
  display: flex;
  align-items: center;
  font-size: inherit;
  font-weight: inherit;
  margin: 0;
}

.legal-branding span {
  color: var(--accent);
  transform: translate(0,4px);
}

mc-ico-parallel:after {
  content: '';
  position: absolute;
  padding: 0px 10px;
  border: solid 2px var(--button-color);
  margin-left: -13px;
  border: solid 1px transparent;
  margin-top: -8px;
  transition: all ease 0.33s;
  transform: rotate(150deg);
  height: 3px;
  background-color: var(--accent-dim-2);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  border-bottom: none;
  transition: all ease 0.33s;
  box-shadow: 0px 0px 0px var(--pill-text);
}

mc-ico-parallel:before {
  content: '';
  border-color: transparent;
  margin-top: 3px;
  margin-left: 14px;
  padding: 0;
  background-color: var(--accent);
  width: 6px;
  height: 6px;
  margin-top: 1px;
  margin-right: 3px;
  float: left;
  border-radius: 100%;
  transition: all ease 0.4s;
}

mc-ico {
  display: block;
  float: right;
  width: auto;
  transform: scale(0.7) translate(10px, -3px);
  transition: all ease 0.33s;
  position: relative;
  margin: 0 auto;
  float: left;
  top: unset;
  opacity: 1;
  padding: 0;
  z-index: 100;
  transform: scale(0.6) translate(0px, 10px);
  margin-top: 0;
  margin-bottom: 0;
  padding: 5px 5px;
  will-change: transform;
}

mc-ico.active {
  opacity: 1;
  width: 33px;
  transform: scale(1.5);
  top: calc(50vh - 167px);
}

mc-ico.active.check:before,
mc-ico.active.check:after,
mc-ico.active.check mc-ico-parallel:before,
mc-ico.active.check mc-ico-parallel:after {
  background-color: var(--green);
  opacity: 0;
}

mc-ico[back_mode] mc-ico-parallel:after {
  margin-top: -17px;
  padding: 0 16px;
  margin-left: -24px;
  height: 3px;
}

mc-ico[back_mode] mc-ico-parallel:before {
  display: none;
}

mc-ico[back_mode] mc-ico-parallel {
  float: left;
}

mc-ico[back_mode]:before {
  display: none;
}

mc-ico[back_mode]:after {
  margin-top: 4px;
  height: 4px;
  margin-left: -24px;
}

mc-ico:after {
  content: '';
  position: absolute;
  padding: 0px 16px;
  border: solid 2px var(--button-color);
  margin-left: -47px;
  border: solid 0px var(--pill-text);
  margin-top: -13px;
  transition: all ease 0.33s;
  transform: rotate(38deg) translate(0, 0);
  height: 5px;
  background-color: var(--accent-dim-2);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  border-top: none;
  border-bottom: none;
  animation-iteration-count: 3;
}

mc-ico:before {
  content: ' ';
  line-height: 50px;
  border-color: transparent;
  padding: 0;
  width: 10px;
  height: 10px;
  margin-top: 0px;
  float: left;
  border-radius: 100%;
  background-color: var(--accent);
  margin-right: -4px;
  transition: all ease 0.33s;
  font-weight: 800;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-main);
  animation: net-eye 3s 0.1s ease-in-out 1;
}

@keyframes net-eye {
  0% {
    box-shadow: 0px 3px 19px var(--net-color-4);
  }

  50% {
    box-shadow: 0px 3px 0px var(--net-color-4);
  }

  100% {
    box-shadow: 0px 3px 19px var(--net-color-4);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0
  }

  top {
    opacity: 1
  }
}

@keyframes loading{
  from{
    transform:rotate(360deg) 
  }
  to{
    transform:rotate(0deg)
  }
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-size: 11px;
  justify-content: space-evenly;
}

.legal-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.legal-links a:hover {
  text-decoration: underline;
  color: var(--primary);
}

.filters-bar {
  padding: 16px;
  border-bottom: solid 1px var(--border-color);
  background: transparent;
  display: flex;
  gap: 12px;
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}

.filter-dropdown {
  position: relative;
}

.filter-btn {
  padding: 8px 16px;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--bg-primary);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all .2s;
  font-size: 16px;
}

.filter-btn:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.filter-popup {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  background: radial-gradient(circle at top left, var(--dashboard-card-bg-start) 0%, var(--dashboard-card-bg-end) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  padding: 12px;
  min-width: 200px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 600px;
  overflow-y: auto;
}

.filter-popup.hidden {
  display: none;
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px;
  border-radius: 26px;
  cursor: pointer;
  font-size: 16px;
  border: solid 1px var(--border);
  padding-left: 10px;
  color: var(--text-main);
  transition: all ease .3s;
}

.filter-option.selected,  .filter-option.selected:hover{
  background:var(--accent);
  color:var(--text-secondary);
  border-color: var(--accent);
}

.filter-option:hover {
  background: transparent;
  color: var(--accent);
  border: solid 1px var(--accent);
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0 16px 16px;
  overflow-y: auto;
  flex: 1;
  min-height: 0;
}

.property-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  background: radial-gradient(circle at top left, var(--dashboard-card-bg-start) 0%, var(--dashboard-card-bg-end) 100%);
  border: solid 1px var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: all ease .5s;
}

.card-top-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
}

.card-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.property-card:hover {
  border-color: var(--accent);
}

.card-thumb {
  width: 120px;
  height: 80px;
  border-radius: 8px;
  background: #ddd;
  object-fit: cover;
}

.card-thumb-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark, #1a1a2e);
  color: var(--text-muted, #64748b);
  font-size: 1.5rem;
  flex-shrink: 0;
}

.card-title {
  font-weight: 700;
  margin-bottom: 4px;
}

.card-price {
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 4px;
  color: var(--accent);
}

.card-meta {
  display: flex;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 0;
}

.card-features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
  margin-top: 0;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 13px;
}

.right-column {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
  overflow: hidden; /* Restore hidden overflow for auto-fit */
  min-height: 0;
}

.map-panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  flex: 1 1 auto; /* Flex grow and shrink */
  display: flex;
  flex-direction: column;
  min-height: 0; /* Allow shrinking below content size if needed */
}

.map-filters {
  padding: 10px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  position: relative;
  z-index: 1001;
  overflow-x: auto;
}

.pillbar {
  display: flex;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all ease .3s;
}

.pill:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: var(--accent);
}

.pill.active {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.popup-header {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

.range-inputs {
  display: flex;
  gap: 8px;
}

.range-inputs input {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 26px;
  font-size: 16px;
  outline: none;
  background: var(--bg-lighter);
}

.popup-options {
  max-height: 200px;
  overflow-y: auto;
  display: grid;
  gap: 4px;
}

.popup-footer {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Onboarding progress bar */
.ob-progress {
  margin-bottom: 12px;
}
.ob-progress-header {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.ob-progress-track {
  width: 100%;
  height: 6px;
  background: var(--bg-lighter);
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.ob-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 0.2s ease;
}

.btn-apply {
  width: 100%;
  padding: 10px;
  background: var(--warning);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
}

.btn-apply:hover {
  background: var(--warning);
}

.rooms-selector {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 0;
}

.room-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all ease .5s;
}

.room-btn:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.room-btn.selected {
  background: var(--accent);
  color: var(--text-secondary);
  border-color: var(--accent);
}

.tags-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-height: -webkit-fill-available;
  overflow-y: auto;
}

.tag-option {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 26px;
  font-size: 16px;
  cursor: pointer;
  text-align: center;
  transition: all ease .5s;
}

.tag-option:hover {
  border-color: var(--accent);
  color: var(--accent)
}

.tag-option.selected {
  background: var(--accent);
  color: var(--text-secondary);
  border-color: var(--accent);
}

.map {
  width: 100%;
  flex: 1;
  min-height: 0;
  z-index: 1;
}

.bottom-panels {
  display: flex;
  gap: 16px;
  height: fit-content;
  min-height: 320px;
  flex-shrink: 0;
  max-height: 28vh;
}

.avatar-panel,
.cta-panel {
  background: #eff1f5;
  border: 1px solid var(--border);
  border-radius: 16px;
  height: 100%;
  min-height: 180px;
  display: flex;
  place-items: center;
  max-width: 23vw;
  transition: all ease .5s;
  overflow: hidden;
}

.avatar-panel {
  position: relative;
}

.avatar-panel img, .avatar-panel canvas{
  width:100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  background: #eff1f5;
  max-height: -webkit-fill-available;
  border-radius: 16px;
  min-height: 320px;
  height: 30vh;
  max-height: unset;
  height: 150% !important;
  object-position: top;
  margin-top: 50%;
  cursor: pointer;
}

.avatar-preview-canvas {
  opacity: 0;
  transition: opacity 1s ease;
}

.avatar-preview-canvas.ready {
  opacity: 1;
}

.avatar-preview-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 200px;
  background: #eff1f5;
  border-radius: 16px;
  padding: 10px;
}

.avatar-preview-tts-spinner {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3;
  pointer-events: none;
}

.avatar-preview-tts-spinner-icon {
  width: 30px;
  height: 30px;
  border: 2px solid var(--accent-dim);
  border-radius: 50%;
  border-top-color: var(--accent);
  animation: spin 1s ease-in-out infinite;
  position: absolute;
  top: 20px;
  right: 20px;
}

.avatar-loader-spinner {
  font-size: 32px;
  color: var(--primary, #2563eb);
}

.avatar-title {
  color: var(--muted);
  font-weight: 700;
}

.cta-placeholder {
  color: var(--muted);
}

@media (max-width: 1024px) {
  .cockpit {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr 1fr;
  }

  .page {
    height: auto;
    overflow: auto;
  }

  html,
  body {
    height: auto;
    overflow: auto;
  }

  .list-panel {
    height: 50vh;
  }

  .right-column {
    height: auto;
  }

  .map-panel {
    height: 50vh;
    min-height: 50vh;
    flex: 0 0 auto; /* Disable flex grow/shrink on mobile */
  }

  .bottom-panels {
    grid-template-columns: 1fr;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }
}

.detail-grid {
  display: grid;
  grid-template-columns: max(430px, 30vw) 1fr;
  gap: 16px;
  height: 100%;
}

.detail-left {
  background: radial-gradient(circle at top left, var(--dashboard-card-bg-start) 0%, var(--dashboard-card-bg-end) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
  overflow: hidden;
}

.detail-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
  flex-shrink: 0;
}

.detail-header .detail-meta {
  color: var(--accent);
}

.detail-title {
  margin: 0 0 8px 0;
  font-weight: 800;
  font-size: 22px;
}

.detail-scroll-content {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 20px;
}

.detail-box {
  padding: 12px 16px;
  display: grid;
  gap: 8px;
}

.feature-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.feature-row:last-child{
  border-bottom:none;
}

.feature-name {
  color: var(--color-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.nd-accordion {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  width: 100%;
}

.nd-accordion--unstyled {
  border: none;
  background: transparent;
}

.nd-accordion__item {
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.nd-accordion__item:last-child {
  border-bottom: none;
}

.nd-accordion__title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  background: #fff;
  font-weight: 600;
  user-select: none;
  transition: background 0.2s;
}

.nd-accordion__title:hover {
  background: #f9fafb;
}

.nd-accordion__title.is-selected {
  background: #f0f7ff;
}

.nd-accordion__icon {
  width: 16px;
  height: 16px;
  fill: var(--text);
  transition: transform 0.3s ease;
}

.nd-accordion__item.is-open .nd-accordion__icon {
  transform: rotate(180deg);
}

.nd-accordion__content {
  display: none;
  padding: 0;
  padding-top: 10px;
  padding-bottom: 10px;
  background: transparent;
  border-top: 1px solid var(--border);
}

.nd-accordion__item.is-open .nd-accordion__content {
  display: block;
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nd-stack {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nd-radio,
.nd-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text-main);
}

.modal-window.wide {
  max-width: 800px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.contact-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.contact-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.agent-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
}

.agent-avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.agent-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 0;
  display: block;
}

.agent-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.agent-info h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.agent-info .role {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 8px;
  display: block;
}

.agent-contacts {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  align-items: flex-start;
}

.agent-contacts a {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.agent-contacts a:hover {
  color: var(--primary);
}

.office-card {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 16px;
}

.office-icon {
  background: #e0e7ff;
  color: var(--primary);
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.office-info h3 {
  margin: 0 0 4px 0;
  font-size: 16px;
}

.office-info .address {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
  display: block;
}

.office-contacts .contact-row {
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.map-card {
  padding: 0;
  overflow: hidden;
  height: 33vh;
  min-height: 250px;
  position: relative;
}

.map-embed {
  width: 100%;
  height: 100%;
}

.map-overlay-label {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  will-change: blur;
}

.modal-overlay.hidden {
  display: none;
}

.modal-window {
  background: #fff;
  border-radius: 16px;
  padding: 32px;
  width: 90%;
  max-width: -webkit-fill-available;
  height: 90%;
  position: relative;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease-out;
  overflow: hidden;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--muted);
}

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

.modal-body {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}

.contact-item i {
  color: var(--primary);
  width: 20px;
  text-align: center;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font-main);
}

.nd-radio__element,
.nd-checkbox__element {
  accent-color: var(--primary);
  width: 18px;
  height: 18px;
  cursor: pointer;
  margin: 0;
}

.nd-radio__text,
.nd-checkbox__text {
  user-select: none;
}

.nd-dropdown__contentScrollable {
  max-height: 600px;
  overflow-y: auto;
}

.feature-name i {
  color: var(--muted);
  width: 20px;
  text-align: center;
}

.feature-val {
  font-weight: 700;
}

.detail-price-box {
  background: #fafafa;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
}

.price-value {
  font-size: 24px;
  font-weight: 800;
}

.detail-description {
  padding: 16px;
  line-height: 1.6;
  color: var(--text-main);
}

.detail-description h3 {
  margin-top: 0;
  font-size: 18px;
  margin-bottom: 10px;
  color: var(--text-main);
}

.detail-right {
  background: radial-gradient(circle at top left, var(--dashboard-card-bg-start) 0%, var(--dashboard-card-bg-end) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1 1 auto;
  min-height: 0;
  max-height: calc(100% - 220px); /* Leave space for bottom-panels */
}

.gallery-tabs {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: transparent;
}

.gallery-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.main-image-area {
  flex: 1;
  background: var(--bg-dark);
  display: block;
  place-items: center;
  overflow: hidden;
  position: relative;
}

.main-image-area.content-mode {
  background: transparent;
  display: block;
}

.main-image-area img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  cursor: grab;
  height: -webkit-fill-available;
  width: 100%;
}

.main-image-area iframe {
  width: 100%;
  height: 100%;
  min-height: 232px;
  border: none;
}

.no-images {
  color: var(--text-main);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100px;
}

.thumbs-scroll-container {
  height: 100px;
  background: transparent;
  border-top: 1px solid var(--border);
  overflow-x: auto;
  white-space: nowrap;
  padding: 10px;
  scroll-behavior: smooth;
  cursor: grab;
  overflow-y: hidden;
}

.thumbs-scroll-container.active {
  cursor: grabbing;
  user-select: none;
}

.thumbs-track {
  display: inline-flex;
  gap: 10px;
  height: 100%;
}

.thumbs-track:empty{
  display:none;
}

.thumb-item {
  width: 120px;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
  opacity: 1;
  transition: all ease .3s;
  cursor: pointer;
  border: 2px solid transparent;
  flex-shrink: 0;
  border-color: var(--border);
}

.thumb-item.active {
  opacity: 1;
  border-color: var(--accent);
}

.thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chat-panel {
  background: radial-gradient(circle at top left, var(--dashboard-card-bg-start) 0%, var(--dashboard-card-bg-end) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  width: -webkit-fill-available;
}

.chat-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  color: var(--muted);
  font-size: 13px;
}

.quick-qa {
  padding: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.qa-answer {
  padding: 16px;
  flex: 1;
  font-style: italic;
  color: #555;
  background: #fafafa;
  display: none;
}

.fullscreen-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  will-change: blur;
  background: rgb(0 0 0 / 50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.fullscreen-modal.hidden {
  display: none;
}

.close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  z-index: 10001;
  font-weight: 300;
}

.modal-content {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.modal-content img {
  max-width: 90%;
  max-height: 80vh;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  color: #fff;
  border: none;
  font-size: 30px;
  padding: 20px;
  cursor: pointer;
  border-radius: 50%;
  transition: all ease .3s;
}

.nav-btn:hover {
  opacity: 0.6;
}

.prev {
  left: 20px;
}

.next {
  right: 20px;
}

.modal-thumbs {
  height: 100px;
  display: flex;
  gap: 10px;
  padding: 20px;
  overflow-x: auto;
}

.detail-features-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  background: var(--bg-dark, #1a1a2e);
  color: var(--text-main, #e2e8f0);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border, #2d2d44);
  transition: background 0.2s;
}

.feature-pill i {
  font-size: 12px;
  color: var(--accent, #60a5fa);
}

.price-info-box {
  background: transparent;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px;
  margin-top: 16px;
}

.price-info-header {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 16px;
  color: var(--text-main);
}

.price-info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.price-info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-info-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}

.price-info-value {
  font-size: 14px;
  color: var(--muted);
}

.mortgage-container {
  padding: 32px;
  height: 100%;
  overflow-y: auto;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: -webkit-fill-available;
  padding-left: 15px;
  padding-right: 15px;
  padding-bottom: 0;
  padding-top: 20px;
}

.mortgage-header {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text);
}

.mortgage-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* Gallery Navigation Arrows */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgb(147 147 147 / 70%);
    color: #fff;
    border: none;
    font-size: 16px;
    height: 40px;
    width: 40px;
    padding: 4px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    border-radius: 4px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    will-change: blur;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}

.gallery-nav:hover {
    background: rgb(147 147 147 / 43%);
}

.gallery-nav.prev {
    left: 10px;
}

.gallery-nav.next {
    right: 10px;
}

/* Ensure images don't block pointer events for arrows if needed, though z-index handles it */

.mortgage-input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mortgage-input-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrapper input,
.input-wrapper select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 16px;
  font-family: var(--font-main);
  transition: border-color 0.2s;
  padding-right: 33px;
}

.input-wrapper input:focus,
.input-wrapper select:focus {
  border-color: var(--primary);
  outline: none;
}

.input-wrapper .suffix {
  position: absolute;
  right: 16px;
  color: var(--muted);
  pointer-events: none;
  font-weight: 600;
}

.mortgage-result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  padding: 32px;
  background: #f8fafc;
  border-radius: 20px;
  border: 1px solid var(--border);
}

@media (min-width: 900px) {
  .mortgage-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;
    gap: 20px;
    align-items: start;
    padding: 20px;
  }

  .mortgage-header {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .mortgage-grid {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 24px;
    height: 100%;
  }

  .mortgage-result {
    height: 100%;
    justify-content: center;
    margin-top: 0;
  }
}

.donut-chart {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) 0% 70%, #e5e7eb 70% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.donut-inner {
  width: 120px;
  height: 120px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.monthly-payment {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.payment-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 600;
}

.result-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px dashed var(--border);
  gap: 10px;
}

.result-row:last-child {
  border-bottom: none;
}

.result-row label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
}

.result-row span {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
}

.avatar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, var(--bg-tertiary) 0%, var(--bg-dark) 100%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
}

.avatar-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.overlay-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 20px;
  background: #eff1f5;
  border-bottom: 1px solid var(--border);
  height: 64px;
}

.overlay-brand img {
  height: 60px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.overlay-close {
  padding: 10px 14px;
  border-radius: 26px;
  text-decoration: none;
  font-weight: 600;
  background: transparent;
  color: var(--danger);
  border: solid 1px var(--danger);
  transition: all ease .3s;
  cursor: pointer;
}

.overlay-close:hover {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.overlay-content {
  flex: 1;
  display: flex;
  padding: 0;
  gap: 0;
  overflow: hidden;
  background: #eff1f5;
}

.avatar-full-box {
  flex: 1;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: flex 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.avatar-full-box img, .avatar-full-box canvas{
  height:100%;
  width: 100%;
  object-fit: cover;
  object-position: bottom;
  vertical-align: bottom;
  margin-top: 30%;
}


.onboarding-box {
  flex: 1;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: flex 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease, margin 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  opacity: 1;
}

.onboarding-box.collapsed {
  flex: 0;
  opacity: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
}

.box-content {
  text-align: center;
  height: -webkit-fill-available;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.box-content h2 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 20px;
  text-transform: lowercase;
}

.btn-termina {
  margin-top: 20px;
  padding: 12px 30px;
  font-size: 16px;
  cursor: pointer;
  background: #000;
  color: #fff;
  border: none;
  font-weight: bold;
  text-transform: uppercase;
  transition: transform 0.2s, background 0.2s;
}

.btn-termina:hover {
  background: #333;
  transform: scale(1.05);
}

.leaflet-control-zoom {
  border: none !important;
  box-shadow: none !important;
}

.leaflet-control-zoom a {
  border-radius: 50% !important;
  width: 40px !important;
  height: 40px !important;
  line-height: 40px !important;
  color: var(--text-secondary);
  background-color: var(--accent-dim-2);
  border: none;
  box-shadow: var(--shadow-sm);
  margin-bottom: 8px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-size: 23px !important;
  font-weight: 400 !important;
  transition: all 0.2s ease;
  text-decoration: none !important;
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  will-change: blur;
  font-family: var(--font-sans);
}

.leaflet-control-zoom a:hover {
  background-color: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 4px 12px rgba(0, 81, 255, 0.3) !important;
}

.leaflet-touch .leaflet-control-zoom a:first-child {
  border-top-left-radius: 50% !important;
  border-top-right-radius: 50% !important;
  background: var(--accent-dim-2);
}

.leaflet-touch .leaflet-control-zoom a:last-child {
  border-bottom-left-radius: 50% !important;
  border-bottom-right-radius: 50% !important;
  background: var(--accent-dim-2);
}

/* Legal Pages Layout */
.legal-page {
  padding-top: 40px;
  padding-bottom: 40px;
  height: auto; /* Fix scrolling issue by removing fixed height */
  overflow: visible; /* Allow content to flow naturally */
  max-height: -webkit-fill-available;
  overflow-y: auto;
}

.legal-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: start; /* Ensure sidebar aligns to top */
}

/* Legal Sidebar */
.legal-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  max-height: calc(100vh - 240px); /* Prevent sidebar from overflowing viewport */
  overflow-y: auto; /* Allow internal scrolling if sidebar is too long */
  background: var(--bg-secondary); /* Use defined var */
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border);
  min-height: calc(100vh - 215px);
}

.legal-nav-title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-main);
  margin-bottom: 16px;
  font-weight: 600;
}

.legal-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.legal-nav li {
  margin-bottom: 8px;
}

.legal-nav a {
  display: block;
  padding: 8px 12px;
  color: var(--text-primary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.legal-nav a:hover {
  background-color: var(--surface-hover);
  color: var(--primary);
}

.legal-nav a.active {
  color: var(--accent);
  font-weight: 500;
}

/* Legal Content */
.legal-content-wrapper {
  background: var(--bg-secondary);
  border-radius: 12px;
  padding: 40px;
  border: 1px solid var(--border);
  min-height: 600px;
  max-height: calc(100vh - 215px);
  overflow-y: auto;
}

.legal-header {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.legal-header h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
  margin-top: 0;
}

.legal-header .subtitle {
  color: var(--text-muted);
  font-size: 16px;
}

.legal-header .last-updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 12px;
  font-style: italic;
  font-family: 'Inter', sans-serif;
}

.legal-chapter {
  margin-bottom: 40px;
  scroll-margin-top: 100px; /* Offset for sticky header */
}

.legal-chapter h2 {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--primary-ink);
  margin-bottom: 16px;
}

.legal-chapter .chapter-content {
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
}

.legal-chapter .chapter-content table{
  background:var(--bg-lighter);
  padding:10px;
  overflow-x: auto;
  width:100%;
  max-width: -webkit-fill-available;
  position: relative;
  display: block;
  border-radius: 16px;
}

.legal-chapter .chapter-content table td{
  padding:10px;
}

.legal-chapter .chapter-content p {
  margin-bottom: 16px;
}


/* ===== GDPR COOKIE POPUP STYLES ===== */
.gdpr-popup, .cookie-consent-banner {
    position: fixed;
    bottom: 0;
    right: 10px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: solid 1px var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-width: 480px;
    max-height: 450px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.gdpr-popup.show, .cookie-consent-banner.show{
    transform: translateY(0);
    bottom: 10px;
}


.gdpr-popup-content {
    padding: 20px 20px 0 20px;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
}

.gdpr-popup-content::-webkit-scrollbar {
    width: 6px;
}

.gdpr-popup-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.gdpr-popup-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.gdpr-popup-content::-webkit-scrollbar-thumb:hover {
    background: #999;
}

.gdpr-popup h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-main);
    margin-top: 0;
}

.gdpr-popup p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.cookie-preferences {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.cookie-option {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    background: var(--bg-tertiary);
}

.cookie-option label {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-main);
    margin-bottom: 6px;
    cursor: pointer;
}

.cookie-option input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: var(--brand-signature-blue);
}

.cookie-option input[type="checkbox"]:disabled {
    opacity: 0.6;
}

.cookie-description {
    font-size: 11px;
    color: #666;
    line-height: 1.4;
    margin: 0;
}

.gdpr-popup-buttons {
    position: sticky;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #e0e0e0;
    padding: 15px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding-right: 0;
    padding-left: 0;
}

.gdpr-popup-buttons .btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    text-decoration: none;
    display: inline-block;
    flex: 1;
    text-align: center;
    min-width: 80px;
}

.gdpr-popup-buttons .btn.primary {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.gdpr-popup-buttons .btn.primary:hover {
    background: #0041cc;
    border-color: #0041cc;
}

.gdpr-popup-buttons .btn:not(.primary):not(.secondary) {
    background: #f8f9fa;
    color: var(--accent);
    border-color: var(--border);
}

.gdpr-popup-buttons .btn:not(.primary):not(.secondary):hover {
    background: var(--bg-dark);
    border-color: var(--border);
}

.gdpr-popup-buttons .btn.secondary {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.gdpr-popup-buttons .btn.secondary:hover {
    background: #f8f9fa;
    color: var(--text-color);
}

.gdpr-popup-footer {
    text-align: center;
    padding: 10px 20px 15px 20px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #e0e0e0;
}

.gdpr-popup-footer a {
    color: var(--accent);
    text-decoration: none;
    font-size: 11px;
    margin: 0 8px;
}

.gdpr-popup-footer a:hover {
    text-decoration: underline;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .gdpr-popup {
        bottom: 0;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .gdpr-popup-content {
        padding: 15px;
        max-height: 50vh;
        padding-bottom: 0;
    }

    .gdpr-popup-buttons {
        flex-direction: column;
        align-items: stretch;
        padding-right: 0;
        padding-left: 0;
    }

    .gdpr-popup-buttons .btn {
        text-align: center;
        margin-bottom: 5px;
    }

    .gdpr-popup h3 {
        font-size: 16px;
    }

    .gdpr-popup p {
        font-size: 13px;
    }
}


@media (max-width: 900px) {
  .legal-container {
    grid-template-columns: 1fr;
  }
  
  .legal-sidebar {
    position: static;
    margin-bottom: 24px;
  }
}
