/*
 * Application-wide styles
 * Propshaft serves files directly without Sprockets preprocessing
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,200..800;1,200..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Great+Vibes&family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Merriweather:ital,opsz,wght@0,18..144,300..900;1,18..144,300..900&family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,opsz,wght@0,6..12,200..1000;1,6..12,200..1000&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Marcellus&family=Zain:ital,wght@0,200;0,300;0,400;0,700;0,800;0,900;1,300;1,400&display=swap');

html, body {
  overscroll-behavior: none;
}

svg {
  pointer-events: none
}

.markdown p {
  margin-bottom: .7em;
}

.markdown p:last-child {
  margin-bottom: 0;
}

.markdown ul {
  list-style-type: disc;
  margin-left: 1.5em;
  margin-bottom: .7em
}

li {
  list-style-type: disc;
  margin-left: 1.5em;
}

.markdown ol {
  list-style-type: decimal;
  margin-left: 1.5em;
  margin-bottom: .7em
}

textarea.auto-resize {
  overflow-y: hidden;
  resize: none;
  font-size: 16px;
}

.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-layer {
  left: 0;
  position: absolute;
  top: 0;
}

.leaflet-container {
  -webkit-tap-highlight-color: transparent;
  background: #d4e7d4;
  cursor: grab;
  overflow: hidden;
  position: relative;
}

.leaflet-map-pane,
.leaflet-tile-pane,
.leaflet-overlay-pane,
.leaflet-marker-pane,
.leaflet-shadow-pane,
.leaflet-zoom-box {
  left: 0;
  position: absolute;
  top: 0;
}

.leaflet-container:active {
  cursor: grabbing;
}

.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
  height: auto;
  max-height: none !important;
  max-width: none !important;
  padding: 0;
  width: auto;
}

.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile,
.leaflet-tile-container {
  -webkit-user-drag: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  user-select: none;
}

.leaflet-marker-icon,
.leaflet-marker-shadow {
  display: block;
}

.leaflet-pane {
  z-index: 400;
}

.leaflet-tile-pane {
  z-index: 200;
}

.leaflet-overlay-pane {
  z-index: 400;
}

.leaflet-marker-pane {
  z-index: 600;
}

.leaflet-map-pane canvas {
  z-index: 100;
}

.leaflet-map-pane svg {
  z-index: 200;
}

.leaflet-control {
  pointer-events: auto;
  position: relative;
  z-index: 800;
}

.leaflet-top,
.leaflet-bottom {
  pointer-events: none;
  position: absolute;
  z-index: 1000;
}

.leaflet-top {
  top: 0;
}

.leaflet-right {
  right: 0;
}

.leaflet-bottom {
  bottom: 0;
}

.leaflet-left {
  left: 0;
}

.leaflet-popup {
  margin-bottom: 20px;
  position: absolute;
  text-align: center;
}

.leaflet-popup-content-wrapper {
  text-align: left;
}

.leaflet-popup-content {
  line-height: 1.4;
  margin: 13px 24px 13px 20px;
}

.leaflet-popup-tip-container {
  height: 20px;
  left: 50%;
  margin-left: -20px;
  margin-top: -1px;
  overflow: hidden;
  pointer-events: none;
  position: absolute;
  width: 40px;
}

.leaflet-popup-tip {
  height: 17px;
  margin: -10px auto 0;
  padding: 1px;
  transform: rotate(45deg);
  width: 17px;
}

.leaflet-container a.leaflet-popup-close-button {
  background: transparent;
  border: 0;
  position: absolute;
  text-align: center;
  text-decoration: none;
}

.leaflet-zoom-animated {
  transform-origin: 0 0;
}

.leaflet-tile {
  filter: inherit;
}

.leaflet-pane > svg path,
.leaflet-tile-container {
  pointer-events: none;
}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive {
  pointer-events: auto;
}

.nature-map-pin {
  align-items: center;
  display: flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.nature-map-pin__marker {
  background: #14532d;
  border: 2px solid #fff;
  border-radius: 9999px 9999px 9999px 0;
  box-shadow: 0 6px 14px rgba(20, 83, 45, 0.35);
  display: block;
  height: 20px;
  transform: rotate(-45deg);
  width: 20px;
}

.nature-map-pin--current-user .nature-map-pin__marker {
  background: #2563eb;
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.35);
}

.nature-map-pin--other-user .nature-map-pin__marker {
  background: #14532d;
  box-shadow: 0 6px 14px rgba(20, 83, 45, 0.35);
}

.nature-map-pin__marker::after {
  background: #fff;
  border-radius: 9999px;
  content: '';
  display: block;
  height: 7px;
  left: 50%;
  position: relative;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 7px;
}

.nature-map-cluster {
  align-items: center;
  border: 2px solid #fff;
  border-radius: 9999px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.22);
  color: #fff;
  display: flex;
  font-size: 0.75rem;
  font-weight: 700;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.nature-map-cluster--current-user {
  background: #2563eb;
}

.nature-map-cluster--other-user {
  background: #14532d;
}

.nature-map-cluster__count {
  line-height: 1;
}

.marker-cluster,
.marker-cluster div {
  align-items: center;
  border-radius: 9999px;
  display: flex;
  justify-content: center;
}

.marker-cluster {
  background: rgba(20, 83, 45, 0.16);
}

.marker-cluster div {
  background: #14532d;
  border: 2px solid #fff;
  box-shadow: 0 10px 24px rgba(20, 83, 45, 0.25);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  height: 100%;
  width: 100%;
}

.nature-map-popup .leaflet-popup-content-wrapper {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(212, 212, 216, 0.95);
  border-radius: 1rem;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  padding: 0;
}

.nature-map-popup .leaflet-popup-content {
  margin: 0;
  padding: 0.9rem;
}

.nature-map-popup .leaflet-popup-close-button {
  color: #52525b;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.35rem 0.45rem 0 0;
  right: 0;
  top: 0;
}

.nature-map-popup .leaflet-popup-tip {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(212, 212, 216, 0.95);
  box-shadow: none;
}


@layer components {
  .verse-container {
    @apply relative;
  }

  .verse-details {
    @apply relative z-10;
  }

  /* Ensure detail boxes appear above other content */
  [data-tool-placement-detail-target="detail"] {
    @apply relative;
    z-index: 20;
  }

  /* Smooth appearance animation */
  [data-tool-placement-detail-target="detail"]:not(.hidden) {
    animation: slideInDown 0.2s ease-out;
  }

  @keyframes slideInDown {
    from {
      opacity: 0;
      transform: translateY(-8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
