/* STYLESHEET CHO STORE LOCATOR HỒ CÂU TỰ NHIÊN (REF MATCH 100%) */
:root {
  --primary-yellow: #f7c223;
  --primary-yellow-light: #fde047;
  --primary-yellow-dark: #e5b119;
  --text-dark: #111827;
  --text-gray: #4b5563;
  --text-sub: #6b7280;
  --bg-card: #ffffff;
  --border-card: #e5e7eb;
  --accent-blue: #0288d1;
  --accent-red: #ea4335;
  --sidebar-width: 380px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #f3f4f6;
  color: var(--text-dark);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

#app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
}

/* ----------------------------------------------------
   SIDEBAR LOCATOR (LEFT)
---------------------------------------------------- */
#locator-sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  flex-shrink: 0;
}

#locator-sidebar.collapsed {
  transform: translateX(-100%);
}

/* HEADER SEARCH / FILTER SECTION (YELLOW BACKGROUND) */
.locator-search-header {
  background: var(--primary-yellow);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.search-box-row {
  position: relative;
  width: 100%;
}

.search-box-row input {
  width: 100%;
  padding: 10px 40px 10px 14px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--primary-yellow-light);
  color: var(--text-dark);
  font-size: 0.88rem;
  font-weight: 500;
  outline: none;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.search-box-row input::placeholder {
  color: #6b7280;
  font-weight: 400;
}

.search-box-row input:focus {
  background: #ffffff;
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.search-box-row button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.filter-dropdowns-row {
  display: flex;
  gap: 8px;
}

.filter-dropdowns-row select {
  flex: 1;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: var(--primary-yellow-light);
  color: var(--text-dark);
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  appearance: auto;
}

.filter-dropdowns-row select:focus {
  background: #ffffff;
}

.nearby-link-row button {
  background: none;
  border: none;
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nearby-link-row button:hover {
  color: #111827;
  text-decoration: underline;
}

/* LIST OF LOCATIONS BODY */
.locator-list-body {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
}

.locator-list-body::-webkit-scrollbar {
  width: 5px;
}
.locator-list-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 4px;
}

#spot-list {
  display: flex;
  flex-direction: column;
}

/* SPOT CARD ITEM */
.spot-card {
  padding: 16px;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  gap: 14px;
  background: #ffffff;
  cursor: pointer;
  transition: background 0.18s ease;
}

.spot-card:hover {
  background: #f9fafb;
}

.spot-card.active {
  background: #fefce8;
  border-left: 4px solid var(--primary-yellow);
}

.spot-card-thumb {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  background: #e5e7eb;
}

.spot-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spot-card-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.spot-card-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #111827;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 2px;
}

.spot-info-line {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 0.8rem;
  color: #4b5563;
  line-height: 1.35;
}

.spot-info-line .info-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.spot-info-line .info-text {
  flex: 1;
  word-break: break-word;
}

.spot-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.btn-detail-more {
  background: var(--primary-yellow);
  color: #111827;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-detail-more:hover {
  background: var(--primary-yellow-dark);
}

.link-dir {
  color: var(--accent-blue);
  font-size: 0.8rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.link-dir:hover {
  color: #01579b;
  text-decoration: underline;
}

/* ----------------------------------------------------
   MAP CONTAINER (RIGHT)
---------------------------------------------------- */
#map-container {
  flex: 1;
  height: 100vh;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
}

/* MAP CONTROLS OVERLAY (TOP LEFT OF MAP) */
#map-custom-controls {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.map-zoom-box {
  background: #ffffff;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.map-zoom-box button {
  width: 32px;
  height: 32px;
  border: none;
  background: #ffffff;
  font-size: 18px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.map-zoom-box button:first-child {
  border-bottom: 1px solid #f3f4f6;
}

.map-zoom-box button:hover {
  background: #f9fafb;
  color: #111827;
}

.map-toggle-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--primary-yellow);
  color: #111827;
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.2s ease;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.map-toggle-btn:hover {
  background: var(--primary-yellow-dark);
}

/* GOOGLE RED DROP PIN STYLING */
.custom-google-pin-icon {
  background: transparent !important;
  border: none !important;
}

.google-pin-wrapper {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.google-pin-wrapper:hover {
  transform: scale(1.2) translateY(-4px);
}

/* LEAFLET CONTROL ATTRIBUTION HIDE */
.leaflet-control-attribution {
  display: none !important;
}

/* MODAL OVERLAY */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-overlay.hidden {
  display: none;
}

.modal-content {
  background: #ffffff;
  border-radius: 8px;
  width: 90%;
  max-width: 440px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

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

.modal-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #111827;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: #6b7280;
  cursor: pointer;
}

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.form-group input[type="text"], .form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border-radius: 4px;
  border: 1px solid #d1d5db;
  font-size: 0.85rem;
  outline: none;
}

.form-group.row {
  display: flex;
  gap: 10px;
}

.form-group.row .col {
  flex: 1;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.btn-secondary {
  background: #e5e7eb;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn-primary {
  background: var(--primary-yellow);
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.empty-state {
  padding: 30px 20px;
  text-align: center;
  color: #6b7280;
  font-size: 0.88rem;
}
