* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background: #f4f5f7;
}

#map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: pan-y;
}

#header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 22;
  pointer-events: none;
}

.logo-link,
.logo {
  pointer-events: auto;
}

.logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.logo-link:active {
  transform: scale(0.98);
}

#google-ui {
  position: fixed;
  inset: 0;
  z-index: 18;
  pointer-events: none;
}

.gm-topbar {
  position: fixed;
  top: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 16px;
  pointer-events: none;
}

.place-sheet {
  position: fixed;
  top: 72px;
  left: 16px;
  width: 390px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 88px);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.16);
  overflow: hidden;
  transition: transform 0.25s ease, opacity 0.25s ease;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.place-sheet::-webkit-scrollbar {
  display: none;
}

.place-sheet.hidden {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.place-sheet-handle {
  width: 84px;
  height: 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  margin: 14px auto 2px;
}

.place-sheet-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 16px 0;
}

.place-sheet-header h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.1;
  color: #202124;
}

.sheet-subtitle {
  margin-top: 6px;
  font-size: 13px;
  color: #5f6368;
}

.sheet-time {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #000;
}

.sheet-icon-actions {
  display: flex;
  gap: 10px;
}

.sheet-icon-actions button {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  color: #3c4043;
  font-size: 18px;
}

#sheet-save,
#sheet-share {
  display: none;
}

.sheet-actions {
  display: none;
}

.sheet-media {
  display: block;
  padding: 0 16px;
}

.sheet-media img {
  width: 100%;
  display: block;
  object-fit: cover;
  border-radius: 18px;
}

#sheet-image-main {
  aspect-ratio: 1 / 0.82;
}

.sheet-media-stack {
  display: none;
}

.sheet-cta {
  padding: 12px 16px 16px;
}

.sheet-product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.sheet-product-link:hover {
  opacity: 0.92;
}


.sheet-product-link:active {
  transform: scale(0.98);
}

#sheet-share-product {
  display: none;
}

.sheet-tabs {
  display: none;
}

.sheet-info-card {
  display: none;
}

.gm-fabs {
  display: none;
}

.gm-fab {
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
  font-size: 22px;
  color: #3c4043;
}

.custom-marker {
  width: 40px;
  height: 40px;
  background-size: cover;
  background-position: center;
  border-radius: 50%;
  border: 2px solid white;
  transform: scale(1);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
}

.custom-marker:hover {
  transform: scale(1.12) translateY(-2px);
}

.custom-marker.active {
  transform: scale(1.35) translateY(-8px);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.35),
    0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 2;
}

@media (max-width: 979px) {
  .gm-topbar,
  .gm-fabs {
    display: none;
  }

  #header {
    top: 12px;
  }

  .place-sheet {
    top: auto;
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    max-height: 70vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(0);
  }

  .place-sheet.hidden {
    transform: translateY(100%);
    opacity: 1;
  }
}

.mapboxgl-popup {
  max-width: none !important;
  z-index: 30;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: all 0.3s ease;
}

.mapboxgl-popup.mapboxgl-popup-anchor-bottom {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.mapboxgl-popup-content {
  padding: 0 !important;
  width: auto !important;
  overflow: visible;
  background: transparent !important;
  box-shadow: none !important;
}

.mapboxgl-popup-tip {
  border-top-color: rgba(16, 16, 18, 0.92) !important;
}

.popup-card {
  position: relative;
  width: min(320px, 86vw);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(16, 16, 18, 0.92);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.26),
    0 10px 24px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
}

.popup-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #111;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
}

.popup-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.popup-body {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0) 100%),
    rgba(16, 16, 18, 0.92);
}

.popup-moment {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.74);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.popup-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.popup-meta {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.72);
}

.popup-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  color: #111;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.popup-btn:hover {
  transform: translateY(-1px);
  opacity: 0.96;
}

.popup-btn:active {
  transform: scale(0.98);
}

.popup-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.48);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  transition: transform 0.2s ease, background 0.2s ease;
  z-index: 3;
}

.popup-close-btn:hover {
  background: rgba(0, 0, 0, 0.62);
  transform: scale(1.04);
}

.popup-close-btn:active {
  transform: scale(0.96);
}

#gm-reset {
  display: none;
}
