/* 3D Home Tour Premium Style Sheet */

:root {
  --primary-color: #3b82f6; /* Modern Blue */
  --primary-glow: rgba(59, 130, 246, 0.4);
  --accent-color: #10b981; /* Emerald Green for Editor */
  --accent-glow: rgba(16, 185, 129, 0.4);
  --danger-color: #ef4444; /* Soft Red */
  --background-dark: #090d16;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --glass-bg: rgba(15, 23, 42, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-dark);
  color: var(--text-main);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

/* 3D WebGL Canvas Container */
#canvas-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  cursor: grab;
}

#canvas-container:active {
  cursor: grabbing;
}

/* Main Dashboard UI Layout */
#ui-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
  pointer-events: none; /* Let clicks pass through to Three.js canvas by default */
  display: grid;
  grid-template-columns: 350px 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header header"
    "sidebar main"
    "sidebar footer";
  padding: 20px;
  gap: 20px;
}

/* Enable pointer events on all UI components */
.interactive-panel {
  pointer-events: auto;
  background: var(--glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* New Header Component Layout */
header.top-header {
  grid-area: header;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(33, 35, 40, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.back-btn {
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  opacity: 0.8;
  transition: opacity 0.2s;
  flex-shrink: 0;
}

.back-btn:hover {
  opacity: 1;
}

.property-address {
  font-size: 15px;
  font-weight: 400;
  color: white;
  margin: 0;
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.view-toggle {
  display: flex;
  background: rgba(255,255,255,0.15);
  border-radius: 30px;
  padding: 4px;
  gap: 4px;
}

.toggle-btn {
  background: transparent;
  border: none;
  color: white;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:hover:not(.active) {
  background: rgba(255,255,255,0.1);
}

.toggle-btn.active {
  background: white;
  color: #1465e6;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Media Containers (Photos & Floor Plans) */
.media-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #121316;
  z-index: 5;
  padding-top: 80px; /* Space for header */
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.gallery-item {
  width: 100%;
  aspect-ratio: 3/2;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.gallery-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.floorplan-view {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  height: 100%;
  position: relative;
}

.floorplan-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  max-height: 80vh;
}

.floorplan-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  background: white;
  padding: 10px;
  border-radius: 8px;
  display: block;
}

/* Floor Plan Interactive Pins */
.fp-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.fp-pin:hover {
  transform: translate(-50%, -50%) scale(1.25);
}

.fp-pin.fp-pin-3d {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  border: 2px solid #93c5fd;
}

.fp-pin.fp-pin-photo {
  background: linear-gradient(135deg, #059669, #10b981);
  color: white;
  border: 2px solid #a7f3d0;
}

.fp-pin svg {
  width: 16px;
  height: 16px;
  pointer-events: none;
}

/* Floating Floor Plan Top Controls Bar & Legend */
.fp-top-bar {
  position: absolute;
  top: 80px;
  right: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.fp-legend-bar {
  position: absolute;
  bottom: 20px;
  right: 24px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 6px;
  gap: 4px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.fp-legend-item {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  border-radius: 20px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.fp-legend-item:hover {
  color: white;
}

.fp-legend-item.active {
  color: white;
  background: rgba(255, 255, 255, 0.15);
}

.fp-checkbox {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.08);
  transition: all 0.2s ease;
}

.fp-legend-item.active .fp-checkbox {
  background: #3b82f6;
  border-color: #60a5fa;
  box-shadow: 0 0 8px rgba(59, 130, 246, 0.5);
}

.fp-checkbox svg {
  width: 12px;
  height: 12px;
  color: white;
}

.fp-legend-badge {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  transition: all 0.2s ease;
}

.fp-badge-3d {
  background: #3b82f6;
  box-shadow: 0 0 8px #3b82f6;
}

.fp-badge-photo {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.fp-legend-item:not(.active) .fp-legend-badge {
  background: #6b7280;
  box-shadow: none;
}

.fp-edit-btn {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 30px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.fp-edit-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.fp-edit-btn.active {
  background: #2563eb;
  border-color: #60a5fa;
  box-shadow: 0 0 15px rgba(37, 99, 235, 0.5);
}

.sidebar {
  grid-area: sidebar;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.sidebar.collapsed {
  transform: translateX(-370px);
  opacity: 0;
  pointer-events: none;
}

.sidebar-header {
  padding: 20px 20px 10px 20px;
}

.search-container {
  position: relative;
  margin-top: 12px;
}

.search-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 10px 16px 10px 38px;
  border-radius: 10px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 14px;
  transition: all 0.2s;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.2);
  background: rgba(255, 255, 255, 0.08);
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 10px 20px 20px 20px;
}

.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}
.sidebar-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
.sidebar-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.category-group {
  margin-bottom: 24px;
}

.category-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 700;
}

.room-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  background: rgba(255, 255, 255, 0.02);
}

.room-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.05);
}

.room-item.active {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.25);
}

.room-item-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.room-item:hover .room-item-thumb {
  transform: scale(1.05);
}

.room-item.active .room-item-thumb {
  border-color: var(--primary-color);
}

.room-item-info {
  flex: 1;
  min-width: 0;
}

.room-item-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-main);
}

.room-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Control Bar UI (Bottom-Right Floating Glass Capsule Bar) */
.controls-container {
  position: absolute;
  bottom: 20px;
  right: 20px;
  display: flex;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 30px;
  padding: 4px;
  gap: 4px;
  z-index: 11;
  pointer-events: auto;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

.control-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  color: white;
  cursor: pointer;
  background: transparent;
  border: none;
  box-shadow: none;
  transition: all 0.2s ease;
  pointer-events: auto;
}

.control-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateY(-1px);
}

.control-btn:active {
  transform: scale(0.95);
}

.control-btn.active {
  background: white;
  color: #1465e6;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.control-btn svg {
  width: 20px;
  height: 20px;
  transition: transform 0.2s;
}

.control-btn.active {
  color: white;
  background: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 0 15px var(--primary-glow);
}

.control-btn.active:hover {
  background: #2563eb;
}

#minimap-panel {
  position: absolute;
  bottom: 20px;
  right: 20px;
  width: 320px;
  height: 240px;
  display: flex;
  flex-direction: column;
  z-index: 10;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#minimap-panel.collapsed {
  height: 45px;
}

.minimap-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.minimap-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#minimap-canvas {
  width: 100%;
  height: 100%;
  flex: 1;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

/* Editor Console Overlay (Top-Right Floating) */
#editor-console {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 380px;
  max-height: calc(100vh - 350px);
  z-index: 12;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

#editor-console.visible {
  display: flex;
}

.editor-header {
  padding: 16px;
  border-bottom: 1px solid rgba(16, 185, 129, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(16, 185, 129, 0.05);
}

.editor-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-title svg {
  width: 16px;
  height: 16px;
}

.editor-scroll {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.editor-scroll::-webkit-scrollbar {
  width: 6px;
}
.editor-scroll::-webkit-scrollbar-thumb {
  background: rgba(16, 185, 129, 0.2);
  border-radius: 10px;
}

.editor-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.editor-help {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
  border-left: 3px solid var(--accent-color);
}

.hotspot-card-editor {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.2s;
}

.hotspot-card-editor.selected {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

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

.form-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.form-input, .form-select {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 13px;
}

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

.slider-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-input {
  flex: 1;
  accent-color: var(--accent-color);
  background: rgba(0, 0, 0, 0.3);
  height: 4px;
  border-radius: 2px;
}

.slider-value {
  font-size: 11px;
  width: 45px;
  text-align: right;
  font-family: monospace;
}

.editor-buttons {
  display: flex;
  gap: 10px;
}

.btn {
  flex: 1;
  padding: 10px;
  border-radius: 8px;
  font-family: var(--font-family);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background: #059669;
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  border-color: rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
  background: var(--danger-color);
  color: white;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn svg {
  width: 16px;
  height: 16px;
}

/* Modal Overlay for Export */
.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 16, 0.8);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.modal-overlay.visible {
  display: flex;
}

.modal-content {
  width: 500px;
  max-width: 90%;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body textarea {
  width: 100%;
  height: 250px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: #10b981;
  font-family: monospace;
  font-size: 11px;
  padding: 12px;
  resize: none;
}

.modal-body textarea:focus {
  outline: none;
  border-color: var(--accent-color);
}

/* Dynamic CSS Tooltip/Preview Card */
.hotspot-tooltip {
  position: absolute;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 6px;
  padding: 6px 10px;
  width: auto;
  min-width: max-content;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px) scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.hotspot-tooltip.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tooltip-thumb {
  display: none;
}

.tooltip-name {
  font-size: 13px;
  font-weight: 500;
  margin-top: 0;
  color: white;
}

.tooltip-category {
  display: none;
}

/* Splash/Loading Screen */
#loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-dark);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.5s ease-out;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 3px solid rgba(59, 130, 246, 0.1);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(59, 130, 246, 0.05);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-muted);
}

.loading-bar-container {
  width: 250px;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
}

.loading-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, var(--primary-color), #60a5fa);
  transition: width 0.3s;
}

/* Compass and Rotation indicator overlay */
#compass {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(0deg);
  transition: transform 0.1s linear;
}

#compass svg {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
}


/* Custom Context Menu */
.context-menu {
  position: absolute;
  z-index: 100000;
  background: rgba(9, 13, 22, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  padding: 6px;
  min-width: 190px;
  pointer-events: auto; /* Allow clicking! */
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-main);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.context-menu-item:hover {
  background: rgba(255, 255, 255, 0.08);
}

.context-menu-item.ctx-danger {
  color: var(--danger-color);
}

.context-menu-item.ctx-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.context-menu-item svg {
  width: 16px;
  height: 16px;
}

/* Room Picker Grid and Cards */
.room-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
  padding: 16px;
}

.room-picker-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.room-picker-card:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.3);
  transform: translateY(-4px);
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.15);
}

.room-picker-thumb {
  width: 100%;
  height: 95px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.room-picker-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* App Stage Container */
#app-stage {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* Mobile View Customization (Both Portrait & Landscape Mobile Devices) */
@media (max-width: 950px), (max-height: 500px) {
  /* Hide Rooms Directory sidebar and expand button */
  .sidebar,
  #sidebar-panel,
  #btn-expand-sidebar {
    display: none !important;
  }

  /* Hide left side of top header (back button & address) */
  .header-left {
    display: none !important;
  }

  /* Completely remove top header container box, borders, background & shadows */
  header.top-header {
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    justify-content: flex-end !important;
    padding: 12px 16px !important;
  }

  /* Keep header-right (Photos | 3D Home | Floor Plan toggle) visible */
  .header-right {
    display: flex !important;
  }
}

/* Full-Screen Photos Lightbox Gallery Modal */
#photos-lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  max-width: 88vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.lightbox-caption {
  margin-top: 16px;
  color: white;
  font-size: 15px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 8px 20px;
  border-radius: 30px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  letter-spacing: 0.5px;
  text-align: center;
}

.lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  color: white;
}

.lightbox-close {
  top: 24px;
  right: 24px;
}

.lightbox-close:hover {
  transform: scale(1.1);
}

.lightbox-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}




