/* Layout shell for index.html — map fills space between header and footer */

:root {
  --photomap-header-bg: #e8f4fc;
  --photomap-footer-bg: #f5f0e8;
  --photomap-map-bg: #dce8f0;
}

/* Full viewport column so Leaflet gets a non-zero height (flex + h-100 alone often stays 0px). */
.photomap-app {
  min-height: 100vh;
  min-height: 100dvh;
}

.photomap-header {
  background-color: var(--photomap-header-bg);
  flex-shrink: 0;
}

.photomap-footer {
  background-color: var(--photomap-footer-bg);
  flex-shrink: 0;
}

.photomap-main {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

#map.photomap-map {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  min-height: 240px;
  background-color: var(--photomap-map-bg);
}

.leaflet-container {
  height: 100% !important;
  width: 100% !important;
  background-color: var(--photomap-map-bg);
}

/* After leaflet.css — disable grab/grabbing so markers are easier to click */
.leaflet-container,
.leaflet-container.leaflet-grab,
.leaflet-container.leaflet-touch.leaflet-grab,
.leaflet-grab,
.leaflet-touch .leaflet-grab,
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-container,
.leaflet-pane,
.leaflet-map-pane,
.leaflet-tile-pane,
.leaflet-overlay-pane {
  cursor: default !important;
}

.photomap-gmap-marker,
.leaflet-marker-icon.photomap-gmap-marker {
  cursor: pointer !important;
  background: transparent !important;
  border: none !important;
}

.photomap-map-placeholder {
  min-height: 12rem;
}

#user-avatar:not([src]),
#user-avatar[src=""] {
  display: inline-block;
  background-color: var(--bs-secondary-bg);
}

.dropdown-toggle-no-caret::after {
  display: none;
}

/* Leaflet tooltips (map.js) */
.photomap-leaflet-tooltip {
  font-size: 0.875rem;
  line-height: 1.35;
  max-width: 14rem;
}

.photomap-leaflet-tooltip--thumb {
  max-width: 7.5rem;
  padding: 0.35rem 0.45rem;
}

.photomap-tooltip-thumb {
  display: block;
  width: 6.5rem;
  height: 4.875rem;
  object-fit: cover;
  border-radius: 0.25rem;
  margin: 0 auto 0.35rem;
  background-color: var(--photomap-map-bg);
}

.photomap-tooltip-count {
  display: block;
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.photomap-leaflet-tooltip .photomap-tooltip strong {
  display: block;
  margin-bottom: 0.15rem;
}

/* Google Maps–style teardrop markers (map.js) */
.leaflet-marker-icon.photomap-gmap-marker {
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

#btn-admin-panel {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  white-space: nowrap;
  display: inline-block !important;
}

#btn-admin-panel[hidden] {
  display: none !important;
}

#auth-user .photomap-user-block {
  min-width: 5.5rem;
}

.photomap-admin-table td {
  vertical-align: middle;
}

#btn-notice-board.photomap-notice-board--new {
  font-weight: 600;
  border-color: var(--bs-primary);
  color: var(--bs-primary);
  box-shadow: 0 0 0 0.15rem rgba(var(--bs-primary-rgb), 0.2);
}

.photomap-notice-table td {
  vertical-align: top;
}

.photomap-notice-content {
  max-width: 18rem;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.875rem;
}

/* Leaflet panes can sit above Bootstrap’s default modal stack on some browsers */
.modal {
  z-index: 2000;
}

.modal-backdrop {
  z-index: 1990;
}

