/* Custom Styles */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: #eff6ff;
}

/* Critical header typography: keep the first paint identical to the Tailwind-rendered menu. */
#customer-nav-items > .header-menu-link {
  font-size: 1rem;
  font-weight: 700;
}

#customer-nav-items > .header-social-link {
  font-size: 0.875rem;
  font-weight: 700;
}

#mobile-nav-items > .header-menu-link {
  font-size: 1rem;
  font-weight: 700;
}

#mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: grid;
  box-sizing: border-box;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: 68px;
  padding: 7px max(8px, env(safe-area-inset-left)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-right));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
  backdrop-filter: blur(14px);
}

#mobile-bottom-nav.hidden {
  display: none;
}

#mobile-bottom-nav button {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  transition: color 0.2s ease, transform 0.2s ease;
}

#mobile-bottom-nav button:active {
  transform: translateY(1px);
}

.mobile-map-list-toggle {
  bottom: calc(68px + 1.25rem);
}

#mobile-bottom-nav button.is-active,
#mobile-bottom-nav button:hover {
  color: #2563eb;
}

#mobile-bottom-nav button[data-bottom-nav="home"] svg {
  width: 27px;
  height: 27px;
  padding: 5px;
  color: #fff;
  background: #2563eb;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.28);
}

#mobile-bottom-nav svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

@media (min-width: 1024px) {
  #mobile-bottom-nav {
    display: none;
  }
}

@media (max-width: 1023px) {
  body {
    padding-bottom: 68px;
  }
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, 'Helvetica Neue', 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
}

.app-dynamic-pending {
  visibility: hidden;
}

.app-dynamic-ready {
  visibility: visible;
}

/* Filled form fields get a subtle visual confirmation. */
.form-filled {
  background-color: #f0f9ff !important;
  border-color: #bae6fd !important;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Hide Scrollbar helper */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

/* Kakao Map Custom Overlays & Markers */
.kakao-custom-marker {
  position: relative;
  background: #ffffff;
  border: 2px solid #2563eb;
  border-radius: 20px;
  padding: 4px 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 4px;
}

.kakao-custom-marker::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px 5px 0;
  border-style: solid;
  border-color: #2563eb transparent transparent transparent;
  display: block;
  width: 0;
}

.kakao-custom-marker:hover,
.kakao-custom-marker.active {
  background: #2563eb;
  color: #ffffff;
  transform: scale(1.1) translateY(-4px);
  z-index: 50;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.35);
}

.kakao-custom-marker:hover::after,
.kakao-custom-marker.active::after {
  border-color: #2563eb transparent transparent transparent;
}

.marker-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #475569;
}
.kakao-custom-marker:hover .marker-badge,
.kakao-custom-marker.active .marker-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.map-hover-active {
  border-color: #2563eb !important;
  background-color: #eff6ff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12), 0 8px 18px rgba(15, 23, 42, 0.1);
}

.map-regional-cluster.map-cluster-hover-active {
  border-color: #f97316 !important;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.22), 0 8px 20px rgba(249, 115, 22, 0.3) !important;
}

.map-regional-cluster.map-cluster-hover-active > div:first-child {
  background: linear-gradient(135deg, #ea580c, #f97316) !important;
}

.map-regional-cluster.map-regional-cluster-selected {
  border-color: #ea580c !important;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.25), 0 8px 20px rgba(234, 88, 12, 0.32) !important;
}

.map-regional-cluster.map-regional-cluster-selected > div:first-child {
  background: linear-gradient(135deg, #c2410c, #f97316) !important;
}

.map-kakao-cluster-hover-active {
  background: linear-gradient(135deg, #ea580c, #f97316) !important;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.22), 0 8px 20px rgba(249, 115, 22, 0.3) !important;
  transform: scale(1.1);
  z-index: 40 !important;
}

.map-kakao-cluster-selected {
  background: linear-gradient(135deg, #c2410c, #f97316) !important;
  box-shadow: 0 0 0 4px rgba(234, 88, 12, 0.25), 0 8px 20px rgba(234, 88, 12, 0.32) !important;
  transform: scale(1.1);
  z-index: 40 !important;
}

.map-cluster-hover-ring {
  position: relative;
  width: 72px;
  height: 72px;
  border: 3px solid #f97316;
  border-radius: 50%;
  background: rgba(249, 115, 22, 0.18);
  box-shadow: 0 0 0 7px rgba(249, 115, 22, 0.16), 0 8px 20px rgba(234, 88, 12, 0.28);
  pointer-events: none;
}

.map-cluster-hover-ring span {
  position: absolute;
  left: 50%;
  top: -25px;
  transform: translateX(-50%);
  padding: 4px 8px;
  border-radius: 999px;
  background: #ea580c;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(234, 88, 12, 0.25);
}

/* Fallback Interactive Map Styles (when Kakao Key is not set) */
.demo-map-grid {
  background-color: #e5e9ec;
  background-image: 
    linear-gradient(rgba(203, 213, 225, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203, 213, 225, 0.5) 1px, transparent 1px);
  background-size: 32px 32px;
  position: relative;
  overflow: hidden;
}

.demo-river {
  position: absolute;
  width: 140%;
  height: 90px;
  background: linear-gradient(180deg, #93c5fd 0%, #60a5fa 100%);
  top: 48%;
  left: -20%;
  transform: rotate(-12deg);
  opacity: 0.75;
  border-radius: 40px;
  box-shadow: 0 0 20px rgba(96, 165, 250, 0.4);
}

.demo-road {
  position: absolute;
  background: #ffffff;
  box-shadow: 0 0 4px rgba(0,0,0,0.08);
}

/* Transitions */
.view-panel {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}
.view-panel.active {
  display: block;
  opacity: 1;
}

/* Smooth modal */
.modal-backdrop {
  backdrop-filter: blur(4px);
  background-color: rgba(15, 23, 42, 0.6);
}

.property-detail-gallery-frame {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 18rem;
  max-height: 75vh;
  overflow: hidden;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
}

.property-detail-main-image {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 75vh;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  background: #f8fafc;
  transition: opacity 0.2s ease-in-out;
}

/* Badges for status */
.badge-available {
  background-color: #dcfce7;
  color: #166534;
}
.badge-reserved {
  background-color: #fef9c3;
  color: #854d0e;
}
.badge-completed {
  background-color: #f1f5f9;
  color: #64748b;
}

/* Toast Notification */
.toast-msg {
  animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes slideIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
