/* Add application styles & imports to this file! */

html,
body {
  height: 100%;
}

#blitz-app {
  height: 100%;
}

.polygon-marker {
  background-color: #e0f8c5;
  box-shadow:
    0 0 0 2px #50622b,
    0 0 10px rgba(0, 0, 0, 0.35);
  width: 12px !important;
  height: 12px !important;
  margin-left: -6px !important;
  margin-top: -6px !important;
  border-radius: 50%;
  cursor: move;
  outline: none;
  transition: background-color 0.25s;
}

.polygon-marker.menu {
  margin-left: -11px !important;
  margin-top: -11px !important;
  background-color: rgb(134, 162, 214);
  background-image: url('../icons/icon-settings-white.svg');
  -ms-background-size: 20px 20px;
  background-size: 20px 20px;
  background-repeat: no-repeat;
  background-position: center;
  width: 24px !important;
  height: 24px !important;
  z-index: 10000;
  cursor: pointer;
}

.polygon-marker.info {
  margin-left: -11px !important;
  margin-top: -11px !important;
  background-color: rgb(134, 162, 214);
  background-image: url('../icons/icon-info-white.svg');
  -ms-background-size: 24px 24px;
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  width: 24px !important;
  height: 24px !important;
  z-index: 10000;
  cursor: pointer;
}

.polygon-marker:hover {
  width: 18px !important;
  height: 18px !important;
  margin-left: -9px !important;
  margin-top: -9px !important;
}

.polygon-marker.menu:hover {
  background-color: red;
  width: 24px !important;
  height: 24px !important;
  z-index: 10000;
  margin-left: -11px !important;
  margin-top: -11px !important;
}

.polygon-marker.info:hover {
  background-color: rgb(134, 162, 214);
  width: 24px !important;
  height: 24px !important;
  z-index: 10000;
  margin-left: -11px !important;
  margin-top: -11px !important;
}

.polygon-marker.delete {
  margin-left: -11px !important;
  margin-top: -11px !important;
  background-color: rgb(100, 93, 93);
  background-image: url('../icons/icon-trash-white.svg');
  -ms-background-size: 24px 24px;
  background-size: 24px 24px;
  background-repeat: no-repeat;
  background-position: center;
  width: 24px !important;
  height: 24px !important;
  z-index: 10000;
  cursor: pointer;
}

.polygon-marker.delete:hover {
  background-color: rgb(92, 81, 81);
  background-image: url('../icons/icon-trash-hover-white.svg');
  width: 24px !important;
  height: 24px !important;
  z-index: 10000;
  margin-left: -11px !important;
  margin-top: -11px !important;
}

.polygon-marker.hole {
  background-color: #ffcccc;
  box-shadow:
    0 0 0 2px #aa0000,
    0 0 10px rgba(0, 0, 0, 0.35);
  width: 12px !important;
  height: 12px !important;
  margin-left: -6px !important;
  margin-top: -6px !important;
  border-radius: 50%;
  cursor: move;
  outline: none;
  transition: background-color 0.25s;
}

.polygon-marker.hole:hover {
  background-color: #d4a5b8;
  width: 18px !important;
  height: 18px !important;
  margin-left: -9px !important;
  margin-top: -9px !important;
}

.marker-menu-inner-wrapper {
  display: flex;
  flex-direction: column;
}

.marker-menu-header {
  font-weight: 600;
}

.marker-menu-content {
  display: flex;
  justify-content: space-between;
}

.marker-menu-button {
  padding: 4px;
  border: 1px solid #aaaaaa;
}

.marker-menu-separator {
  padding: 4px;
}

.info-marker,
.alter-marker {
  background-color: blue;
  width: 100%;
  display: flex;
  flex-direction: row-reverse;

  a.leaflet-popup-close-button {
    top: -12px;
    right: -12.5px;
    z-index: 3;
    color: #fff;
    &:hover {
      color: #fff;
    }
  }

  .leaflet-popup-content-wrapper {
    background: #e93434;
    color: #ffffff;
    .leaflet-popup-content {
      margin: 0;
      line-height: 1.4;
    }
  }
  .leaflet-popup-content-wrapper {
    padding: 0;
  }
}

.alter-marker-outer-wrapper,
.info-marker-outer-wrapper {
  overflow: hidden;
  background-color: #80be50;
  border-radius: 12px;
  padding-right: 16px;
  box-shadow: 3px 4px 20px #00000080;
}

.alter-marker-wrapper,
.info-marker-wrapper {
  height: 40px;
  border: 2px solid transparent;
  background-color: #80be50;
  color: #fff;
  padding: 0 6px;
  text-align: center;
  border-radius: 12px;
  text-align: center;
}
.content {
  width: 100%;
  min-height: 40px;
  margin-right: 12px;
}
.marker-menu-content {
  .marker-menu-button {
    width: 22px;
    height: 22px;
    background-repeat: no-repeat;
    background-size: 22px, 22px;
    background-position: center;
    padding: 4px;
    border: 1px solid #fff;
    margin: 4px;
    border-radius: 4px;
    cursor: pointer;

    &.simplify {
      background-image: url('../icons/icon-simplify2.svg');
    }
    &.double-elbows {
      background-image: url('../icons/icon-add-elbow.svg');
    }
    &.bbox {
      background-image: url('../icons/icon-bbox.svg');
    }
    &.bezier {
      background-image: url('../icons/icon-bezier.svg');
      position: relative;
      overflow: hidden;
    }
  }
}

/* Alpha banner for bezier button */
.alpha-banner {
  position: absolute;
  top: 6px;
  right: -18px;
  background: rgba(255, 255, 255, 0.4);
  color: #000;
  padding: 1px 20px;
  font-size: 8px;
  font-weight: 700;
  transform: rotate(45deg);
  transform-origin: center;
  z-index: 10;
  box-shadow: 0 1px 3px #0000004d;
  line-height: 12px;
  letter-spacing: 0.5px;
}

.alter-marker-wrapper .row.bottom-separator {
  border-bottom: 1px dashed #fff;
}
.alter-marker-wrapper .row {
  display: -webkit-box;
  display: flex;
  white-space: nowrap;
}
.alter-marker-wrapper .header {
  padding-right: 4px;
  width: 100%;
  text-align: left;
}
.alter-marker-wrapper .area,
.alter-marker-wrapper .header {
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.alter-marker-wrapper .unit {
  font-size: 11px;
  font-weight: 400;
  line-height: 20px;
}
.alter-marker-wrapper .unit .sup {
  font-size: smaller;
  font-weight: 400;
  line-height: 20px;
  position: relative;
  top: -2px;
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4;
}

.right-margin {
  margin-right: 8px;
}

.info-marker-wrapper .row.bottom-separator {
  border-bottom: 1px dashed #fff;
}
.info-marker-wrapper .row {
  display: -webkit-box;
  display: flex;
  white-space: nowrap;
}
.info-marker-wrapper .header {
  padding-right: 4px;
  width: 100%;
  text-align: left;
}
.info-marker-wrapper .area,
.info-marker-wrapper .header {
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
}

.info-marker-wrapper .unit {
  font-size: 11px;
  font-weight: 400;
  line-height: 20px;
}
.info-marker-wrapper .unit .sup {
  font-size: smaller;
  font-weight: 400;
  line-height: 20px;
  position: relative;
  top: -2px;
}
.leaflet-popup-content {
  margin: 0 !important;
  line-height: 1.4;
}

.right-margin {
  margin-right: 8px;
}

/* Hidden marker styles */
.polydraw-hidden-marker {
  opacity: 0.2;
  transform: scale(0.5);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
  background-color: #e0f8c5 !important;
  box-shadow: none !important;
  border: none !important;
  z-index: 1;
}

.polydraw-hidden-marker:hover {
  opacity: 1 !important;
  transform: scale(1) !important;
  background-color: #e0f8c5 !important;
  box-shadow:
    0 0 0 2px #50622b,
    0 0 10px rgba(0, 0, 0, 0.35) !important;
  border-radius: 50% !important;
  z-index: 10000 !important;
}

/* Ensure hidden markers are still draggable */
.polydraw-hidden-marker.leaflet-marker-draggable {
  cursor: move !important;
}

.leaflet-polydraw-p2p-marker {
  margin-left: -8px;
  margin-top: -8px;
}

.leaflet-polydraw-p2p-marker.edge-deletion-hover {
  background-color: #d9460f !important;
  border-color: #d9460f !important;
  transform: scale(1.5);
  transition: all 0.2s ease;
}

.menu-popup .leaflet-popup-tip-container,
.info-popup .leaflet-popup-tip-container {
  display: none;
}

.menu-popup .leaflet-popup-content-wrapper,
.info-popup .leaflet-popup-content-wrapper {
  background: transparent;
  box-shadow: none;
}

.menu-popup .leaflet-popup-close-button,
.info-popup .leaflet-popup-close-button {
  color: white !important;
}

/* Firefox Android button fix - ensure draw mode buttons remain responsive */
.leaflet-control.leaflet-bar {
  position: relative;
  z-index: 1000;
  pointer-events: auto !important;
}

.leaflet-control.leaflet-bar a {
  pointer-events: auto !important;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Firefox-specific fixes for touch event handling */
@-moz-document url-prefix() {
  .leaflet-control.leaflet-bar {
    position: relative !important;
    z-index: 2000 !important;
    pointer-events: auto !important;
    isolation: isolate;
  }

  .leaflet-control.leaflet-bar a {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    position: relative;
    z-index: 1;
  }

  .sub-buttons {
    pointer-events: auto !important;
    position: relative;
    z-index: 1;
  }

  .sub-buttons a {
    pointer-events: auto !important;
    touch-action: manipulation !important;
    position: relative;
    z-index: 1;
  }
}

/* Additional mobile-specific fixes */
@media (max-width: 768px) {
  .leaflet-control.leaflet-bar a {
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
