/* HartaMediu PATCH 2.9 - culoare, opacitate moderna si AJAX geometrii */

/* Controale comune pentru harta publica */
.hm1523-public-layer-row {
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: 10px 14px !important;
}
.hm1523-public-layer-row .layer-copy strong {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}
.hm1523-layer-swatch {
  display: inline-block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
  border: 2px solid color-mix(in srgb, var(--hm-layer-color, #176b5a) 78%, #102f28);
  border-radius: 4px;
  background: var(--hm-layer-color, #176b5a);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.45);
}
.hm1523-layer-tools {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 76px minmax(145px, 1fr);
  gap: 12px;
  align-items: end;
  padding: 10px 12px;
  border: 1px solid #dce8e4;
  border-radius: 13px;
  background: #f7fbf9;
  transition: opacity .18s ease, filter .18s ease;
}
.hm1523-layer-tools.is-disabled {
  opacity: .42;
  filter: grayscale(.35);
}
.hm1523-color-control,
.hm1523-opacity-control {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #687a74;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
}
.hm1523-color-control input[type="color"] {
  width: 44px;
  height: 30px;
  padding: 3px;
  border: 1px solid #bcd2cb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
.hm1523-color-control input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.hm1523-color-control input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 7px; }
.hm1523-color-control input[type="color"]::-moz-color-swatch { border: 0; border-radius: 7px; }
.hm1523-opacity-control {
  grid-template-columns: minmax(0, 1fr) 38px;
  column-gap: 9px;
}
.hm1523-opacity-control > span { grid-column: 1 / -1; }
.hm1523-opacity-control output {
  color: #38554d;
  font-size: 10px;
  font-weight: 850;
  text-align: right;
}
.hm1523-opacity-control input[type="range"],
.hm1523-opacity input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  height: 7px;
  margin: 7px 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg,#0b6958 0%,#0b6958 62%,#d8e5e1 62%,#d8e5e1 100%);
  outline: none;
  cursor: pointer;
}
.hm1523-opacity-control input[type="range"]::-webkit-slider-thumb,
.hm1523-opacity input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0b6958;
  box-shadow: 0 1px 7px rgba(10,68,57,.32);
}
.hm1523-opacity-control input[type="range"]::-moz-range-thumb,
.hm1523-opacity input[type="range"]::-moz-range-thumb {
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #0b6958;
  box-shadow: 0 1px 7px rgba(10,68,57,.32);
}
.hm1523-layer-tools input:disabled { cursor: not-allowed; }
.hm1523-layer-external,
.hm1523-external-layer {
  display: inline-flex;
  width: fit-content;
  margin-top: 5px;
  color: #0b6958;
  font-size: 10px;
  font-weight: 850;
  text-decoration: none;
}
.hm1523-layer-external:hover,
.hm1523-external-layer:hover { text-decoration: underline; }

/* Harta proiectului */
.hm1514-map-window .hm1522-layer-panel.hm1523-layer-panel {
  width: 330px;
  max-width: min(330px, calc(100vw - 44px));
}
.hm1523-layer-panel .hm1522-layer-head {
  align-items: center;
  min-height: 44px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.hm1523-layer-panel .hm1522-layer-head strong { font-size: 13px; }
.hm1523-layer-panel .hm1523-layer-tools {
  margin: 9px 0 0 39px;
  padding: 8px 9px;
  grid-template-columns: 68px minmax(120px, 1fr);
}
.hm1523-layer-panel .hm1522-opacity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 5px 8px;
  margin: 0;
}
.hm1523-layer-panel .hm1522-opacity > span { grid-column: 1 / -1; }
.hm1523-layer-panel .hm1522-opacity output { text-align: right; }
.hm1523-layer-panel .hm1523-color-control input[type="color"] {
  width: 39px;
  height: 28px;
}

/* Toast pentru salvarea geometriei fara refresh */
.hm1523-geometry-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2147483000;
  max-width: min(390px, calc(100vw - 32px));
  padding: 13px 16px;
  color: #17342d;
  border: 1px solid #c9ddd6;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(7,48,39,.18);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s ease, transform .2s ease;
  font-size: 13px;
  font-weight: 750;
}
.hm1523-geometry-toast.is-visible { opacity: 1; transform: translateY(0); }
.hm1523-geometry-toast.is-success { border-left: 5px solid #159472; }
.hm1523-geometry-toast.is-error { border-left: 5px solid #b84137; }

@media (max-width: 720px) {
  .hm1523-layer-tools { grid-template-columns: 64px minmax(0, 1fr); }
  .hm1514-map-window .hm1522-layer-panel.hm1523-layer-panel { width: 265px; }
  .hm1523-layer-panel .hm1523-layer-tools { margin-left: 0; }
  .hm1523-geometry-toast { right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .hm1523-layer-tools,
  .hm1523-geometry-toast { transition: none; }
}
