/* Suburb Lens — Ray White AR App */

/* Brand tokens */
:root {
  --rw-yellow: #FFE512;
  --rw-yellow-deep: #F8DC00;
  --ink: #171E1A;
  --ink-soft: #2A312D;
  --white: #FFFFFF;
  --off-white: #F8F8F9;
  --grey-500: #9B9B9B;
  --grey-700: #525252;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--white);
  overflow: hidden;
}

/* ===== ENTRY SCREEN ===== */
.entry-screen {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0f0c 0%, #1a1f1c 100%);
  padding: 2rem;
}

.entry-header {
  text-align: center;
  margin-top: 2rem;
}

.entry-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.entry-header h1 span {
  color: var(--rw-yellow);
}

.entry-subtitle {
  color: var(--grey-500);
  font-size: 1rem;
  line-height: 1.4;
}

.entry-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.permission-primer {
  background: rgba(255, 229, 18, 0.08);
  border: 1px solid rgba(255, 229, 18, 0.2);
  border-radius: 12px;
  padding: 1.5rem;
  max-width: 400px;
  text-align: left;
}

.permission-primer p {
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--white);
}

.permission-primer strong {
  color: var(--rw-yellow);
}

.permission-primer ul {
  list-style: none;
  margin: 1rem 0;
  margin-left: 0;
}

.permission-primer li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
}

.permission-note {
  font-size: 0.8rem !important;
  color: var(--grey-500);
  font-style: italic;
}

.entry-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.entry-footer {
  text-align: center;
  color: var(--grey-500);
  font-size: 0.8rem;
}

/* ===== BUTTONS ===== */
.btn {
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--rw-yellow);
  color: var(--ink);
}

.btn-primary:hover {
  background: var(--rw-yellow-deep);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 229, 18, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--ink-soft);
  color: var(--white);
  border: 1px solid rgba(255, 229, 18, 0.4);
}

.btn-secondary:hover {
  border-color: var(--rw-yellow);
  background: rgba(255, 229, 18, 0.08);
}

/* ===== AR VIEW ===== */
.ar-view {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.ar-camera {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ar-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* Radar strip (top) */
.radar-container {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  height: 60px;
  z-index: 20;
  pointer-events: auto;
}

.radar-strip {
  width: 100%;
  height: 100%;
  background: #171E1A;
  border: 1px solid rgba(255, 229, 18, 0.3);
  border-radius: 8px;
  position: relative;
  display: flex;
  align-items: center;
  backdrop-filter: blur(8px);
}

.radar-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  color: var(--rw-yellow);
}

.radar-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  background: var(--rw-yellow);
}

/* Heading indicator */
.heading-indicator {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: #171E1A;
  border: 2px solid var(--rw-yellow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rw-yellow);
  font-weight: bold;
  font-size: 0.9rem;
  z-index: 25;
  backdrop-filter: blur(8px);
}

/* AR cards container */
.ar-cards {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10;
}

.ar-card {
  position: absolute;
  min-width: 140px;
  padding: 0.75rem;
  background: rgba(23, 30, 26, 0.9);
  border: 1px solid rgba(255, 229, 18, 0.2);
  border-radius: 10px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: all 0.2s var(--ease);
  transform-origin: center;
  z-index: 15;
}

.ar-card:hover {
  border-color: rgba(255, 229, 18, 0.6);
  box-shadow: 0 8px 24px rgba(255, 229, 18, 0.2);
  transform: scale(1.05);
}

.ar-card.listing-card.accent-yellow {
  border-color: var(--rw-yellow);
}

.ar-card-header {
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}

.ar-card-header.amenity {
  color: var(--rw-yellow);
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.8px;
}

.price {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--rw-yellow);
}

.ar-card-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--grey-500);
  margin-bottom: 0.4rem;
}

.icon-text {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.distance {
  display: block;
  width: 100%;
  color: var(--rw-yellow);
  font-weight: 600;
  font-size: 0.8rem;
}

.ar-card-name {
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.ar-card-distance {
  font-size: 0.75rem;
  color: var(--rw-yellow);
}

.category {
  display: inline-block;
  background: rgba(255, 229, 18, 0.15);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.65rem;
}

/* Layer chips (left side) */
.layer-chips {
  position: absolute;
  bottom: 100px;
  left: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 20;
  pointer-events: auto;
}

.chip {
  background: #171E1A;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  padding: 0.5rem 0.8rem;
  border: 1px solid rgba(255, 229, 18, 0.2);
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  backdrop-filter: blur(8px);
  white-space: nowrap;
}

.chip:hover {
  border-color: var(--rw-yellow);
}

.chip.active {
  background: var(--rw-yellow);
  color: #171E1A;
}

/* Range control */
.range-control {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.4rem;
  z-index: 20;
  pointer-events: auto;
}

.range-btn {
  padding: 0.5rem 0.75rem;
  background: #171E1A;
  border: 1px solid rgba(255, 229, 18, 0.2);
  border-radius: 6px;
  color: var(--grey-500);
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  backdrop-filter: blur(8px);
}

.range-btn:hover {
  border-color: var(--rw-yellow);
}

.range-btn.active {
  background: var(--rw-yellow);
  color: var(--ink);
  border-color: var(--rw-yellow);
}

/* Mode toggle */
.btn-mode-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: #171E1A;
  border: 1px solid rgba(255, 229, 18, 0.2);
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  backdrop-filter: blur(8px);
  z-index: 22;
}

.btn-mode-toggle:hover {
  border-color: var(--rw-yellow);
  background: rgba(255, 229, 18, 0.1);
}

/* Error overlay */
.error-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.error-card {
  background: var(--ink-soft);
  border: 1px solid var(--rw-yellow);
  border-radius: 12px;
  padding: 2rem;
  max-width: 400px;
  text-align: center;
}

.error-card h2 {
  color: var(--rw-yellow);
  margin-bottom: 1rem;
}

.error-card p {
  color: var(--grey-500);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ===== MAP VIEW ===== */
.map-view {
  position: relative;
  width: 100%;
  height: 100%;
}

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

.map-chips {
  position: absolute;
  top: 1rem;
  left: 1rem;
  bottom: auto;
  flex-direction: row;
  flex-wrap: wrap;
  width: calc(100% - 2rem);
  max-width: 600px;
}

.map-range {
  position: absolute;
  top: 1rem;
  right: 1rem;
  bottom: auto;
}

/* Bottom sheet */
.bottom-sheet {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink-soft);
  border-top: 1px solid rgba(255, 229, 18, 0.2);
  border-radius: 16px 16px 0 0;
  max-height: 70vh;
  overflow-y: auto;
  transition: transform 0.3s var(--ease);
  transform: translateY(100%);
  z-index: 40;
}

.bottom-sheet.open {
  transform: translateY(0);
}

.bottom-sheet-drag {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-bottom: 1px solid rgba(255, 229, 18, 0.1);
}

.bottom-sheet-drag::before {
  content: '';
  width: 32px;
  height: 4px;
  background: rgba(255, 229, 18, 0.3);
  border-radius: 2px;
}

.bottom-sheet-content {
  padding: 1.5rem;
}

.sheet-header {
  position: relative;
  margin: -1.5rem -1.5rem 1rem -1.5rem;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.sheet-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.sheet-type {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--rw-yellow);
  color: var(--ink);
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.sheet-body {
  padding: 0;
}

.sheet-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--rw-yellow);
  margin-bottom: 0.5rem;
}

.sheet-address {
  font-size: 0.95rem;
  color: var(--white);
  line-height: 1.4;
  margin-bottom: 1rem;
}

.sheet-category {
  color: var(--rw-yellow);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 1rem;
}

.sheet-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.feature {
  padding: 0.6rem;
  background: rgba(255, 229, 18, 0.08);
  border: 1px solid rgba(255, 229, 18, 0.2);
  border-radius: 6px;
  font-size: 0.85rem;
  text-align: center;
}

.sheet-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.sheet-actions .btn {
  flex: 1;
  padding: 0.75rem;
  font-size: 0.9rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .entry-screen {
    padding: 1rem;
  }

  .entry-header h1 {
    font-size: 1.5rem;
  }

  .permission-primer {
    padding: 1rem;
  }

  .ar-card {
    min-width: 120px;
    padding: 0.6rem;
  }

  .layer-chips {
    flex-wrap: wrap;
    flex-direction: row;
    width: 100%;
    bottom: auto;
    top: 80px;
    left: 0;
    padding: 0 1rem;
  }

  .chip {
  background: #171E1A;
  color: var(--white);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }

  .range-control {
    flex-direction: column;
  }

  .sheet-features {
    grid-template-columns: 1fr;
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  body {
    background: white;
    color: black;
  }
}

/* ===== NEW STYLES FOR IMPROVEMENTS ===== */

/* Auto range button */
.range-btn.auto-btn {
  font-weight: 600;
  border: 2px solid var(--rw-yellow);
}

.range-btn.auto-btn.active {
  background: var(--rw-yellow);
  color: #171E1A;
}

/* Range label (shows "Auto · 12km") */
.range-label {
  position: absolute;
  top: -2rem;
  right: 0;
  font-size: 0.65rem;
  color: #999;
  font-weight: 500;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* Empty state hint overlay */
.empty-state-hint {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.empty-state-card {
  background: #171E1A;
  border: 2px solid var(--rw-yellow);
  border-radius: 12px;
  padding: 2rem;
  max-width: 280px;
  text-align: center;
  color: white;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
}

.empty-state-card p {
  margin: 0 0 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #ddd;
}

.empty-state-card button {
  width: 100%;
}

/* Guide mode overlay */
.guide-mode-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 2rem;
}

.guide-card-container {
  position: relative;
  width: 100%;
  max-width: 320px;
}

.guide-card {
  background: #171E1A;
  border: 2px solid var(--rw-yellow);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  color: white;
  margin-bottom: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9);
}

.guide-header {
  margin-bottom: 0.5rem;
}

.guide-price {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--rw-yellow);
}

.guide-address {
  font-size: 0.9rem;
  margin: 0.8rem 0 0.5rem 0;
  line-height: 1.4;
}

.guide-category {
  font-size: 0.75rem;
  color: #999;
}

.guide-features {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.8rem;
  font-size: 0.8rem;
}

.guide-arrow {
  width: 60px;
  height: 60px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(0deg);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  will-change: transform;
}

.guide-distance {
  font-size: 2rem;
  font-weight: 700;
  color: var(--rw-yellow);
  text-align: center;
  margin-top: 1rem;
  letter-spacing: 1px;
}

.guide-distance.here {
  animation: pulse-here 1s ease-in-out infinite;
}

@keyframes pulse-here {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* Guide mode exit button */
.guide-exit-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 229, 18, 0.2);
  border: 1px solid var(--rw-yellow);
  color: var(--rw-yellow);
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 201;
}

.guide-exit-btn:hover {
  background: rgba(255, 229, 18, 0.3);
  transform: scale(1.1);
}

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

/* Responsive adjustments */
@media (max-width: 480px) {
  .guide-card {
    padding: 1.5rem;
  }

  .guide-price {
    font-size: 1.2rem;
  }

  .guide-distance {
    font-size: 1.6rem;
  }

  .guide-arrow {
    width: 50px;
    height: 50px;
  }
}
