/* House Dr. custom styles */

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', sans-serif;
}

/* Hide scrollbar but allow scrolling */
.scrollbar-hide {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.scrollbar-hide::-webkit-scrollbar {
  display: none;
}

/* Line clamp utilities */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Saved property heart state */
.save-btn.saved i {
  font-weight: 900 !important;
  color: #e11d48 !important;
}
.save-btn.saved i::before {
  content: "\f004"; /* solid heart */
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open {
  display: flex;
}
.lightbox-img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
}
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: none;
  cursor: pointer;
  backdrop-filter: blur(10px);
  font-size: 20px;
  transition: background 0.2s;
}
.lightbox-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-close {
  top: 20px;
  right: 20px;
  transform: none;
}
.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  backdrop-filter: blur(10px);
}

/* Smooth property card image zoom */
.property-card img {
  will-change: transform;
}

/* Form focus improvements */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid #5C2D91;
  outline-offset: 2px;
}

/* Toast notifications */
#toast-container {
  position: fixed;
  top: 90px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: white;
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 400px;
  transform: translateX(420px);
  transition: transform 0.3s ease;
  pointer-events: auto;
  border-left: 4px solid #5C2D91;
}
.toast.show {
  transform: translateX(0);
}
.toast.success { border-left-color: #10b981; }
.toast.error { border-left-color: #ef4444; }
.toast i {
  font-size: 18px;
}
.toast.success i { color: #10b981; }
.toast.error i { color: #ef4444; }
.toast.info i { color: #5C2D91; }

/* Loading spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Improve select arrow on some browsers */
select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 40px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Skip navigation for a11y */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #5C2D91;
  color: white;
  padding: 10px 16px;
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0;
}

/* Ensure images don't flash before loading */
img {
  background: #f4f4f6;
}
