@charset "utf-8";

/*
 * Shared Leaflet map components used by day-event and future-map pages.
 * Page-specific map presentation remains in each page stylesheet.
 */

#hanabiMap {
  position: relative;
  width: 100%;
  height: 480px;
  background: #ddd;
  pointer-events: auto;
}

#hanabiMap.leaflet-container {
  position: relative;
  width: 100%;
  height: 480px;
  overflow: hidden;
  background: #ddd;
}

#hanabiMap .leaflet-container,
#hanabiMap .leaflet-pane,
#hanabiMap .leaflet-map-pane,
#hanabiMap .leaflet-tile-pane,
#hanabiMap .leaflet-tile-container,
#hanabiMap .leaflet-control-container,
#hanabiMap .leaflet-control {
  display: block;
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

#hanabiMap .leaflet-tile {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 256px;
  height: 256px;
  max-width: none !important;
  max-height: none !important;
}

.hanabi-map-wrap {
  position: relative;
}

.hanabi-div-icon,
.hanabi-event-div-icon {
  background: transparent;
  border: 0;
}

.hanabi-div-icon {
  pointer-events: auto;
}

.hanabi-event-icon {
  display: block;
  width: 24px;
  height: 24px;
  object-fit: contain;
  pointer-events: none;
}

.edge-map-label,
.area-map-badge {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  border: 1px solid #f0a4a8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  color: #333;
  cursor: pointer;
  font-family: inherit;
  outline: none;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.edge-map-label {
  padding: 6px 8px;
  overflow: hidden;
  text-align: center;
}

.edge-map-label__date,
.edge-map-label__title {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edge-map-label__date {
  color: #e03d82;
  font-size: 0.84rem;
  font-weight: bold;
  line-height: 1.15;
  white-space: nowrap;
}

.edge-map-label__title {
  display: -webkit-box;
  margin-top: 3px;
  color: #333;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.area-map-badge {
  padding: 0 12px;
  color: #e34f58;
  font-size: 0.92rem;
  font-weight: bold;
  line-height: 38px;
  text-align: center;
  white-space: nowrap;
}

.edge-map-label:hover,
.area-map-badge:hover {
  background: #fff6f7;
}

.map-label-toggle-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: inline-block;
  padding: 12px 18px;
  border: 1px solid #d7d7d7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  color: #111;
  font: inherit;
  font-size: 1rem;
  font-weight: bold;
  line-height: 1.2;
  cursor: pointer;
  pointer-events: auto;
  touch-action: manipulation;
}

.map-label-toggle-btn:hover,
.map-label-toggle-btn:focus {
  background: #fff;
  border-color: #bfbfbf;
  outline: none;
}

.map-label-toggle-btn:focus-visible {
  outline: 3px solid #1769aa;
  outline-offset: 3px;
}

.map-tap-note {
  margin: 8px 0 14px;
  color: #555;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Shared position-based Map Core (Today reference implementation). */
.hanabi-map-wrap #hanabiMap {
  position: relative;
  width: 100%;
  height: 360px;
  min-height: 360px;
  overflow: hidden;
  background: #eaf2f6;
}

.hanabi-map__empty,
.map-loading-note {
  display: grid;
  height: 100%;
  margin: 0;
  padding: 24px;
  place-items: center;
  color: #566b79;
  font-size: 14px;
  text-align: center;
}

.hanabi-map-cluster-wrap,
.hanabi-map-marker-wrap {
  background: transparent;
  border: 0;
}

.hanabi-map-cluster {
  display: grid;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 50%;
  background: #123f62;
  box-shadow: 0 4px 12px rgba(9, 39, 62, .28);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
}

.hanabi-map-cluster-wrap:hover .hanabi-map-cluster,
.hanabi-map-cluster-wrap:focus-visible .hanabi-map-cluster {
  background: #0b5f91;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, .9), 0 0 0 6px rgba(18, 96, 145, .38);
}

.hanabi-map-cluster-wrap:focus-visible {
  outline: 0;
}

.hanabi-map-marker {
  position: relative;
  display: block;
  width: 25px;
  height: 25px;
  margin: 1px auto 0;
  transform: rotate(45deg);
  border: 2px solid #fff;
  border-radius: 50% 50% 50% 8px;
  background: #176b9c;
  box-shadow: 0 3px 10px rgba(9, 39, 62, .3);
}

.hanabi-map-marker::after {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
  content: "";
}

.hanabi-map-marker-wrap.is-selected .hanabi-map-marker {
  background: #f3474f;
}

.hanabi-map-marker-wrap:focus-visible {
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 4px #176b9c);
  outline: 0;
}

.hanabi-map-popup {
  display: grid;
  gap: 5px;
  min-width: 170px;
  color: #173348;
  font-size: 13px;
  line-height: 1.45;
}

.hanabi-map-popup__title {
  font-size: 14px;
  line-height: 1.45;
}

.hanabi-map-popup__meta {
  display: block;
  color: #536b7b;
}

.hanabi-map-popup__link {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  margin-top: 3px;
  border: 1px solid #2391cc;
  border-radius: 999px;
  color: #09699d;
  font-weight: 700;
  text-decoration: none;
}

.hanabi-map-popup__link:hover,
.hanabi-map-popup__link:focus-visible {
  background: #eaf7fd;
  outline: 2px solid #0b6fa4;
  outline-offset: 2px;
}

.hanabi-map-spark {
  position: absolute;
  z-index: 1000;
  width: 1px;
  height: 1px;
  pointer-events: none;
  animation: hanabi-map-spark-fade 300ms ease-out both;
}

.hanabi-map-spark i {
  --spark-angle: 0deg;
  position: absolute;
  width: 2px;
  height: 13px;
  transform: rotate(var(--spark-angle)) translateY(-5px) scaleY(.25);
  transform-origin: 50% 0;
  border-radius: 999px;
  background: linear-gradient(#fff, #f4d78a);
  animation: hanabi-map-spark-ray 300ms ease-out both;
}

@keyframes hanabi-map-spark-fade {
  0%, 65% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes hanabi-map-spark-ray {
  from { transform: rotate(var(--spark-angle)) translateY(-3px) scaleY(.2); }
  to { transform: rotate(var(--spark-angle)) translateY(-24px) scaleY(1); }
}

.hanabi-map-wrap .leaflet-control-zoom,
.hanabi-map-wrap .hanabi-map-control {
  overflow: hidden;
  border: 1px solid #c8d8e3;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(9, 39, 62, .16);
}

.hanabi-map-wrap .leaflet-control-zoom a,
.hanabi-map-wrap .hanabi-map-fullscreen-button {
  box-sizing: border-box;
  display: grid;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  place-items: center;
  border: 0;
  border-bottom: 1px solid #dbe6ed;
  border-radius: 0;
  background: #fff;
  color: #123f62;
  font-family: inherit;
  font-size: 24px;
  line-height: 42px;
  cursor: pointer;
}

.hanabi-map-wrap .leaflet-control-zoom a:last-child,
.hanabi-map-wrap .hanabi-map-fullscreen-button {
  border-bottom: 0;
}

.hanabi-map-wrap .leaflet-control-zoom a:hover,
.hanabi-map-wrap .hanabi-map-fullscreen-button:hover {
  background: #edf7fc;
  color: #0b5f91;
}

.hanabi-map-wrap .leaflet-control-zoom a:focus-visible,
.hanabi-map-wrap .hanabi-map-fullscreen-button:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid rgba(35, 145, 204, .6);
  outline-offset: -3px;
}

.hanabi-map-fullscreen-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  background:
    linear-gradient(#123f62, #123f62) left top / 7px 2px no-repeat,
    linear-gradient(#123f62, #123f62) left top / 2px 7px no-repeat,
    linear-gradient(#123f62, #123f62) right top / 7px 2px no-repeat,
    linear-gradient(#123f62, #123f62) right top / 2px 7px no-repeat,
    linear-gradient(#123f62, #123f62) left bottom / 7px 2px no-repeat,
    linear-gradient(#123f62, #123f62) left bottom / 2px 7px no-repeat,
    linear-gradient(#123f62, #123f62) right bottom / 7px 2px no-repeat,
    linear-gradient(#123f62, #123f62) right bottom / 2px 7px no-repeat;
}

.hanabi-map-control.is-fullscreen .hanabi-map-fullscreen-icon {
  transform: scale(.82);
}

#hanabiMap:fullscreen,
#hanabiMap:-webkit-full-screen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  background: #eaf2f6;
}

.hanabi-map-wrap .leaflet-control-scale-line {
  border-color: #607d8c;
  background: rgba(255, 255, 255, .86);
  color: #173348;
}

@media (max-width: 767px) {
  .hanabi-map-wrap #hanabiMap {
    height: 300px;
    min-height: 300px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hanabi-map-spark,
  .hanabi-map-spark i,
  .leaflet-zoom-animated,
  .leaflet-marker-icon {
    animation: none;
    transition: none;
  }
}
