/* :root variables are defined in design-tokens.css */

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg-secondary);
  color: var(--color-text-primary);
  min-height: 100vh;
}

/* Header Styles */
/* Header Styles */
.navbar-main {
  height: var(--header-height);
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-border-light);
  padding: 0.5rem 1rem;
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: var(--z-fixed);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.navbar-brand img {
  height: 32px;
  width: auto;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-600);
  margin: 0;
}

/* Sidebar Styles */
/* Sidebar Styles */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  position: fixed;
  top: var(--header-height);
  left: 0;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-right: 1px solid var(--color-border-light);
  transition: transform 0.3s ease, width 0.3s ease;
  z-index: var(--z-sticky);
  overflow-y: auto;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-item {
  margin: 0.25rem 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--color-text-secondary);
  border-radius: var(--radius-md);
  transition: var(--transition-base);
  font-weight: var(--font-weight-medium);
}

.nav-link:hover {
  background-color: var(--color-primary-50);
  color: var(--color-primary-600);
}

.nav-link.active {
  background-color: var(--color-primary-500);
  color: white;
}

.nav-link i {
  width: 1.25rem;
  margin-right: 0.75rem;
  text-align: center;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
  color: var(--color-text-secondary);
  font-size: 1.2rem;
  transition: color 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
}

.sidebar-toggle:hover {
  color: var(--color-primary-600);
}

/* Sidebar States */

/* Sidebar Visible (default state) */
.sidebar-visible .sidebar {
  transform: translateX(0);
}

.sidebar-visible .main-content {
  margin-left: var(--sidebar-width);
}

/* Sidebar Hidden (Desktop) - completely hides sidebar */
@media (min-width: 992px) {
  .sidebar-hidden .sidebar {
    transform: translateX(-100%);
  }

  .sidebar-hidden .main-content {
    margin-left: 0;
  }
}

/* Sidebar Closed (Mobile) */
.sidebar-closed .sidebar {
  transform: translateX(-100%);
}

.sidebar-closed .main-content {
  margin-left: 0;
}

/* Main Content */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 2rem;
  min-height: 1000px;
  height: calc(100vh - var(--header-height));
  transition: margin-left 0.3s ease;
}

/* Responsive Design - Mobile */
@media (max-width: 991.98px) {
  /* On mobile, sidebar is hidden by default */
  .sidebar {
    transform: translateX(-100%);
  }

  /* sidebar-visible shows sidebar on mobile (slide in) */
  .sidebar-visible .sidebar {
    transform: translateX(0);
  }

  /* sidebar-hidden hides sidebar on mobile */
  .sidebar-hidden .sidebar {
    transform: translateX(-100%);
  }

  .main-content {
    margin-left: 0 !important;
    flex: 1;
    min-height: 1000px; /* Important for Firefox */
    height: calc(100vh - 56px); /* Subtract navbar height */
    overflow: auto;
  }

  /* Mobile overlay when sidebar is visible */
  .sidebar-visible::before {
    content: "";
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-height));
    background: rgba(0, 0, 0, 0.5);
    z-index: 1015;
    opacity: 1;
    transition: opacity 0.3s ease;
  }

  .sidebar-hidden::before {
    opacity: 0;
    pointer-events: none;
  }
}

/* Dropdown Styles */
.dropdown-menu {
  border: 1px solid var(--border-color);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.375rem;
}

.dropdown-item {
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dropdown-item i {
  width: 1rem;
  text-align: center;
}

/* Additional Sidebar Styles */
.menu-category {
  margin: 1rem 0;
}

.menu-category h3 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--secondary-color);
  text-transform: uppercase;
  padding: 0.5rem 1.5rem;
  margin: 0;
  letter-spacing: 0.5px;
}

/* Sidebar Group Styles */
.sidebar-group {
  margin: 0.5rem 0;
}

.sidebar-group-header {
  background: none;
  border: none;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: var(--secondary-color);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
  margin: 0 1rem;
}

.sidebar-group-header:focus {
  outline: 2px solid rgba(13, 110, 253, 0.4);
  outline-offset: 2px;
}

.sidebar-group-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-group-header:hover {
  background-color: rgba(13, 110, 253, 0.1);
  color: var(--primary-color);
}

.sidebar-group-header i.toggle-icon {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.sidebar-group.collapsed .sidebar-group-header i.toggle-icon {
  transform: rotate(-90deg);
}

.sidebar-group-content {
  overflow: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out,
    visibility 0s linear 0s;
  opacity: 1;
  visibility: visible;
}

.sidebar-group.collapsed .sidebar-group-content {
  max-height: 0 !important;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  visibility: hidden;
  transition: max-height 0.3s ease-out, opacity 0.3s ease-out,
    visibility 0s linear 0.3s;
}

/* Nav Divider */
.nav-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 1rem 1.5rem;
  opacity: 0.5;
}

.menu-items {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
}

.menu-item {
  position: relative;
}

.menu-item .menu-link,
.menu-item .menu-text {
  display: flex;
  align-items: center;
  padding: 0.5rem 1.5rem;
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.2s;
  font-size: 0.9375rem;
}

.menu-item .menu-link:hover {
  color: var(--primary-color);
  background-color: rgba(13, 110, 253, 0.1);
}

.menu-item.has-submenu > .menu-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1.5rem;
  color: var(--secondary-color);
  cursor: pointer;
  transition: all 0.2s;
}

.menu-item.has-submenu > .menu-label::after {
  content: "\f107";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.menu-item.has-submenu.active > .menu-label::after {
  transform: rotate(180deg);
}

.submenu {
  list-style: none;
  padding: 0;
  margin: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  max-height: 0;
}

.menu-item.has-submenu.active .submenu {
  max-height: 500px;
}

.submenu-item {
  padding-left: 1rem;
}

.submenu-item .menu-link,
.submenu-item .menu-text {
  padding: 0.4rem 1.5rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.submenu-item .menu-link:hover {
  opacity: 1;
}

/* Utility Classes */
.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* :root variables removed - using design-tokens.css */

body {
  color: var(--text-color);
  line-height: 1.6;
  font-family: "Titillium Web", sans-serif;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

h1 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  border-bottom: 3px solid var(--secondary-color);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin: 2rem 0 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h2 i {
  color: var(--secondary-color);
}

.btn-custom {
  background-color: var(--secondary-color);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: 5px;
  transition: all 0.3s ease;
  margin: 0.5rem;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-custom:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.table {
  background-color: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.table th {
  background-color: var(--light-gray);
  color: var(--primary-color);
  font-weight: 600;
  padding: 1rem;
}

.table td {
  padding: 1rem;
  vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.02);
}

.image-container {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
  margin: 0 auto;
  max-width: 300px;
  text-align: center;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.carousel-container {
  max-width: 800px;
  margin: 2rem auto;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  text-align: center;
}

.carousel-item img {
  height: 500px;
  object-fit: cover;
}

.carousel-control-prev,
.carousel-control-next {
  width: 50px;
  height: 50px;
  background-color: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  opacity: 1;
  background-color: var(--secondary-color);
}

.nav-tabs {
  border-bottom: 2px solid var(--border-color);
  margin-bottom: 1rem;
}

.nav-tabs .nav-link {
  color: var(--text-color);
  border: none;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}

.nav-tabs .nav-link.active {
  color: var(--secondary-color);
  border-bottom: 2px solid var(--secondary-color);
  font-weight: 600;
}

#imageCarousel {
  margin: 0 auto;
}

.tab-content {
  text-align: center;
}

.row.image-grid {
  justify-content: center;
  margin: 0 -10px;
}

.col-md-4.image-col {
  padding: 10px;
  display: flex;
  justify-content: center;
}

.map-streetview-section {
  min-height: 600px;
  margin: 2rem 0;
}

.map-streetview-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  height: 600px;
  margin: 0;
}

#map-container,
#streetview-container {
  height: 100%;
  min-height: 600px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

iframe {
  width: 100%;
  height: 100%;
  border: none;
}

@media (max-width: 768px) {
  .map-streetview-container {
    grid-template-columns: 1fr;
    height: auto;
  }

  #map-container,
  #streetview-container {
    height: 400px;
    min-height: 400px;
  }
}

/* Modal improvements */
.modal-content {
  background-color: rgba(255, 255, 255, 0.98);
  border-radius: 12px;
}

.modal-header {
  border-bottom: none;
  padding: 1.5rem;
}

.modal-body {
  padding: 0;
}

#modalCarousel .carousel-item {
  background-color: rgba(0, 0, 0, 0.9);
  padding: 2rem;
}

.price-highlight {
  color: #27ae60;
  font-size: 1.2rem;
  font-weight: 600;
}

.attachment-link {
  color: var(--secondary-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.attachment-link:hover {
  color: var(--primary-color);
  text-decoration: none;
}
.fancybox-margin {
  margin-right: 14px;
}
.search-form {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.search-form.search-form--full {
  max-width: none;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.page-container-full {
  padding: 0;
  margin-left: -2rem;
  margin-right: -2rem;
}

.page-container-full .search-form--full {
  border-radius: 0;
  margin: 0;
  padding: 2rem 1.5rem;
}

@media (min-width: 992px) {
  .page-container-full .search-form--full {
    padding: 3rem 4rem;
  }
}

@media (max-width: 991.98px) {
  .page-container-full {
    margin-left: -1rem;
    margin-right: -1rem;
  }

  .page-container-full .search-form--full {
    padding: 2rem 1rem;
  }
}
.form-floating {
  margin-bottom: 1rem;
}
.guest-select {
  min-width: 120px;
}
#searchUrl {
  word-break: break-all;
}
#saveOptions {
  display: none;
}
#map {
  height: 400px;
  width: 100%;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.coordinates-display {
  font-size: 0.9rem;
  color: #666;
  margin-top: 0.5rem;
}
.map-instructions {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
}
.location-search-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.location-input-wrapper {
  position: relative;
}
.location-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}
.location-suggestion {
  padding: 0.5rem;
  cursor: pointer;
}
.location-suggestion:hover {
  background-color: #f8f9fa;
}
.map-controls {
  margin-bottom: 1rem;
  padding: 0.5rem;
  background: #f8f9fa;
  border-radius: 0.25rem;
}
.selected-area-info {
  background: #e9ecef;
  padding: 0.5rem;
  border-radius: 0.25rem;
  margin-top: 0.5rem;
}
.search-form {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}
#map {
  height: 400px;
  width: 100%;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}
.location-search-spinner {
  display: none;
  width: 1rem;
  height: 1rem;
  position: absolute;
  right: 2.5rem;
  top: 50%;
  transform: translateY(-50%);
}
.location-input-wrapper {
  position: relative;
}
.location-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 0.25rem;
  z-index: 1000;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}
.surface-inputs {
  display: flex;
  gap: 10px;
}
.price-range-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  font-size: 0.875rem;
}
.selected-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.filter-tag {
  background: #e9ecef;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.remove-filter {
  cursor: pointer;
  color: #dc3545;
}
.provider-selection-section .provider-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.provider-selection-section .provider-row .provider-option-wrapper {
  flex: 1 1 220px;
  display: flex;
}

.provider-option {
  flex: 1;
}

@media (max-width: 767.98px) {
  .provider-selection-section .provider-row {
    flex-direction: column;
  }

  .provider-selection-section .provider-row .provider-option-wrapper {
    flex-basis: 100%;
  }
}
