/* ==========================================================================
   THE ARK: DESIGN SYSTEM & STYLING (WHITE/MINIMALIST THEME)
   ========================================================================== */

/* Design Tokens */
:root {
  --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Color Palette (Clean Light Theme) */
  --bg-app: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.82);
  --bg-card-hover: rgba(249, 250, 251, 0.95);
  --border-color: rgba(0, 0, 0, 0.08);
  --border-color-glow: rgba(0, 0, 0, 0.15);
  
  --color-primary: #1f2937; /* Clean Slate/Dark */
  --color-primary-glow: rgba(31, 41, 55, 0.1);
  --color-text-main: #111827;
  --color-text-muted: #6b7280;
  
  /* Status Colors (Pastel/Soft Light Theme equivalents) */
  --color-sale: #10b981;
  --color-sale-bg: rgba(16, 185, 129, 0.08);
  --color-reserved: #f59e0b;
  --color-reserved-bg: rgba(245, 158, 11, 0.08);
  --color-sold: #ef4444;
  --color-sold-bg: rgba(239, 68, 68, 0.08);
  
  /* UI Layout */
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --shadow-premium: 0 10px 40px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.02);
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Reset & Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-app);
  color: var(--color-text-main);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.02);
}

::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* ==========================================================================
   Fullscreen Viewport & Canvas Layout
   ========================================================================== */

.spinner-viewport {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #fbfbfb;
  overflow: hidden;
  cursor: grab;
  z-index: 1;
}

.spinner-viewport:active {
  cursor: grabbing;
}

/* Fullscreen cover aspect-ratio scaling container */
.canvas-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 16 / 9;
  min-width: 100vw;
  min-height: 100vh;
  display: block;
}

#spinnerCanvas {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}

#polygonOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
}

/* Overlay Polygons */
.unit-polygon {
  cursor: pointer;
  transition: fill-opacity 0.2s ease, stroke-width 0.2s ease;
}

.unit-polygon.sale {
  fill: var(--color-sale);
  stroke: var(--color-sale);
}

.unit-polygon.reserved {
  fill: var(--color-reserved);
  stroke: var(--color-reserved);
}

.unit-polygon.sold {
  fill: var(--color-sold);
  stroke: var(--color-sold);
}

.unit-polygon:hover {
  fill-opacity: 0.25 !important;
  stroke-width: 1.5px !important;
}

.unit-polygon.selected {
  fill-opacity: 0.35 !important;
  stroke-width: 2.5px !important;
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.15));
}

/* ==========================================================================
   Floating Overlays
   ========================================================================== */

/* Top-Left Header */
.floating-header {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 10;
  pointer-events: none;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  padding: 8px 16px;
  border-radius: 50px;
  pointer-events: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.project-logo {
  height: 32px;
  object-fit: contain;
}

.brand-text h1 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--color-text-main);
  line-height: 1.1;
}

.brand-text .subtitle {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Floating Navigation Arrows */
.nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 5;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.nav-arrow svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
}

.nav-arrow.left {
  left: 24px;
}

.nav-arrow.right {
  right: 24px;
}

.nav-arrow:hover {
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border-color: rgba(0,0,0,0.15);
}

.nav-arrow.left:hover svg {
  transform: translateX(-2px);
}

.nav-arrow.right:hover svg {
  transform: translateX(2px);
}

/* Floating Action Toolbar */
.floating-toolbar {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Floating Overlay Menu Toggle (Top-Right) */
.drawer-toggle-btn {
  height: 42px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  color: var(--color-text-main);
  padding: 0 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.drawer-toggle-btn:hover {
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

/* Floating Fullscreen Button */
.fullscreen-btn {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  color: var(--color-text-main);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.fullscreen-btn:hover {
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

/* Floating Language Selector */
.lang-selector-container {
  position: relative;
}

.lang-selector-btn {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  color: var(--color-text-main);
  height: 42px;
  padding: 0 16px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-primary);
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.04);
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.lang-selector-btn:hover {
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border-color: rgba(0, 0, 0, 0.15);
}

.lang-flag {
  font-size: 1rem;
}

.dropdown-chevron {
  transition: transform 0.2s ease;
}

.lang-selector-container.active .dropdown-chevron {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 140px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  pointer-events: none;
}

.lang-selector-container.active .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.lang-option {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--color-text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  font-family: var(--font-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-align: left;
}

.lang-option:hover {
  background: rgba(0, 0, 0, 0.04);
}

.lang-option.active {
  background: var(--color-text-main);
  color: #ffffff;
}

/* Floating Tooltip */
.glass-tooltip {
  position: absolute;
  z-index: 10;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--color-text-main);
  pointer-events: none;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  font-size: 0.82rem;
  width: 170px;
  transform: translate(-50%, -105%);
  transition: opacity 0.15s ease;
}

.tooltip-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding-bottom: 6px;
  margin-bottom: 8px;
  font-weight: 700;
}

.tooltip-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tooltip-row {
  display: flex;
  justify-content: space-between;
}

.tooltip-row .label {
  color: var(--color-text-muted);
}

.tooltip-row .value {
  font-weight: 500;
}

/* Status Badges */
.status-badge {
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
}

.status-badge.sale {
  color: #047857;
  background: var(--color-sale-bg);
}

.status-badge.reserved {
  color: #b45309;
  background: var(--color-reserved-bg);
}

.status-badge.sold {
  color: #b91c1c;
  background: var(--color-sold-bg);
}

/* Preload Overlay */
.loader-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 20;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-circle-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring__circle {
  transition: stroke-dashoffset 0.1s linear;
}

.loader-percentage {
  position: absolute;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.loader-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Gesture Overlay */
.gesture-overlay {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-color);
  padding: 6px 14px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  opacity: 0;
  pointer-events: none;
  animation: bounce-horizontal 2.5s infinite;
  z-index: 5;
  transition: opacity 0.5s ease;
}

.drag-icon {
  animation: drag-swipe 2s infinite ease-in-out;
}

/* ==========================================================================
   Slide-Over Drawer panel (White Theme)
   ========================================================================== */

/* Backdrop overlay */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(2px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* Sidebar panel */
.inventory-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 380px;
  max-width: 100%;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  border-left: 1px solid var(--border-color);
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.04);
  z-index: 100;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.inventory-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.drawer-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.close-drawer-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.close-drawer-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--color-text-main);
}

/* Filters */
.filters-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 20px;
  flex-shrink: 0;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-group label {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Beds chips */
.beds-selector {
  display: flex;
  background: rgba(0, 0, 0, 0.03);
  padding: 3px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.bed-chip {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: var(--font-primary);
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.bed-chip:hover {
  color: var(--color-text-main);
}

.bed-chip.active {
  background: #ffffff;
  color: var(--color-text-main);
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  font-weight: 600;
}

/* Select */
.custom-select {
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid var(--border-color);
  color: var(--color-text-main);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-primary);
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
}

.custom-select:focus {
  border-color: rgba(0, 0, 0, 0.3);
}

/* Budget Slider */
.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-value {
  font-size: 0.8rem;
  color: var(--color-text-main);
  font-weight: 600;
}

.budget-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 3px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.budget-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-primary);
  border: 1.5px solid #fff;
  cursor: pointer;
  transition: transform 0.1s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.budget-slider::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

/* Dynamic Unit Scroll list */
.unit-list-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.unit-count-summary {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}

.unit-scroll-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 2px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Unit card list items */
.unit-card {
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition-smooth);
}

.unit-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(0, 0, 0, 0.15);
  transform: translateX(2px);
}

.unit-card.active {
  background: rgba(0, 0, 0, 0.03);
  border-color: var(--color-primary);
}

.unit-info-left {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.unit-card-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.unit-card-details {
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.unit-info-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.unit-card-price {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-text-main);
}

/* Key Animations */
@keyframes drag-swipe {
  0%, 100% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
}

@keyframes bounce-horizontal {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-3px);
  }
  60% {
    transform: translateX(-50%) translateY(-1px);
  }
}

/* Mobile responsive styles */
@media (max-width: 600px) {
  .floating-header {
    top: 16px;
    left: 16px;
  }
  
  .floating-toolbar {
    top: 16px;
    right: 16px;
    gap: 6px;
  }

  .fullscreen-btn {
    width: 36px;
    height: 36px;
  }
  
  .lang-selector-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  
  .lang-selector-btn span.lang-code,
  .lang-selector-btn svg.dropdown-chevron {
    display: none;
  }
  
  .drawer-toggle-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }
  
  .drawer-toggle-btn span {
    display: none;
  }
  
  .nav-arrow {
    width: 44px;
    height: 44px;
  }
  
  .nav-arrow.left {
    left: 12px;
  }
  
  .nav-arrow.right {
    right: 12px;
  }
  
  .inventory-drawer {
    width: 100%;
  }

  /* Mobile responsive overrides for modal */
  .modal-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .modal-body {
    padding: 30px 20px;
  }
  
  .modal-window {
    width: 95%;
    max-height: 90vh;
  }
  
  .close-modal-btn {
    top: 12px;
    right: 12px;
  }
}

/* ==========================================================================
   Apartment Detail Modal Styles
   ========================================================================== */

.modal-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-wrapper.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(8px);
}

.modal-window {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 85vh;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow-y: auto;
  z-index: 2001;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.08);
  backdrop-filter: blur(20px);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.3s ease;
  transform: scale(0.95);
  opacity: 0;
}

.modal-wrapper.active .modal-window {
  transform: scale(1);
  opacity: 1;
}

.close-modal-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: white;
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-main);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
  z-index: 10;
}

.close-modal-btn:hover {
  background: var(--bg-card-hover);
  transform: rotate(90deg);
}

.modal-body {
  padding: 40px;
}

.modal-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
}

.modal-banner {
  width: 100%;
  height: 200px;
  border-radius: var(--radius-md);
  object-fit: cover;
  margin-bottom: 24px;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}

.modal-title-row h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-text-main);
}

.modal-subtitle {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 24px;
}

.modal-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

.modal-spec-card {
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.modal-spec-card .spec-label {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.modal-spec-card .spec-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.modal-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: var(--color-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition-smooth);
  box-shadow: 0 4px 12px rgba(31, 41, 55, 0.1);
  margin-bottom: 24px;
}

.modal-action-btn:hover {
  background: #000;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.modal-facilities {
  margin-bottom: 24px;
}

.modal-facilities h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal-facilities-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  list-style: none;
}

.modal-facilities-list li {
  font-size: 0.78rem;
  color: var(--color-text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

.modal-facilities-list li::before {
  content: "✦";
  color: var(--color-sale);
  font-size: 0.75rem;
}

.modal-location {
  margin-bottom: 24px;
}

.modal-location h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.modal-location p {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 10px;
}

.modal-map-container {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.modal-map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.modal-form-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-form input,
.modal-form textarea {
  font-family: var(--font-primary);
  font-size: 0.8rem;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: white;
  transition: var(--transition-smooth);
}

.modal-form input:focus,
.modal-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px var(--color-primary-glow);
}

.modal-form button {
  padding: 10px;
  background: var(--color-sale);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.modal-form button:hover {
  background: #059669;
  transform: translateY(-1px);
}

.form-success-message {
  text-align: center;
  padding: 24px 12px;
}

.form-success-message h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-sale);
  margin-bottom: 6px;
}

.form-success-message p {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* ==========================================================================
   RTL (Right-To-Left) Layout Styles
   ========================================================================== */

[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .floating-header {
  right: 24px;
  left: auto;
}

[dir="rtl"] .floating-toolbar {
  left: 24px;
  right: auto;
}

[dir="rtl"] .lang-dropdown {
  left: 0;
  right: auto;
}

[dir="rtl"] .lang-option {
  text-align: right;
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-arrow.left {
  right: 24px;
  left: auto;
}

[dir="rtl"] .nav-arrow.left svg {
  transform: scaleX(-1);
}

[dir="rtl"] .nav-arrow.right {
  left: 24px;
  right: auto;
}

[dir="rtl"] .nav-arrow.right svg {
  transform: scaleX(-1);
}

[dir="rtl"] .inventory-drawer {
  left: 0;
  right: auto;
  transform: translateX(-100%);
  border-left: 1px solid var(--border-color);
  border-right: none;
}

[dir="rtl"] .inventory-drawer.active {
  transform: translateX(0);
}

[dir="rtl"] .close-drawer-btn {
  margin-right: auto;
  margin-left: 0;
}

[dir="rtl"] .unit-info-left {
  text-align: right;
}

[dir="rtl"] .unit-info-right {
  text-align: left;
}

[dir="rtl"] .modal-window {
  text-align: right;
}

[dir="rtl"] .close-modal-btn {
  left: 24px;
  right: auto;
}

[dir="rtl"] .modal-left-col {
  order: 2;
}

[dir="rtl"] .modal-right-col {
  order: 1;
}

[dir="rtl"] .form-group label {
  text-align: right;
}

[dir="rtl"] .spec-label {
  text-align: right;
}

[dir="rtl"] .spec-value {
  text-align: left;
}

[dir="rtl"] .modal-facilities-list {
  padding-right: 20px;
  padding-left: 0;
}

[dir="rtl"] .modal-facilities-list li::before {
  margin-right: -20px;
  margin-left: 10px;
}

@media (max-width: 600px) {
  [dir="rtl"] .floating-header {
    top: 16px;
    right: 16px;
    left: auto;
  }
  
  [dir="rtl"] .floating-toolbar {
    top: 16px;
    left: 16px;
    right: auto;
  }
  
  [dir="rtl"] .nav-arrow.left {
    right: 12px;
    left: auto;
  }
  
  [dir="rtl"] .nav-arrow.right {
    left: 12px;
    right: auto;
  }
}

