/* HartaMediu PATCH 2.2 - rapoarte utile, harta reala, filtre si Excel */

.hm1516-report-form {
  margin-bottom: 26px !important;
  padding-bottom: 24px !important;
  border-bottom: 1px solid #dce8e4;
}

.hm1516-report-form > .hm157-primary {
  margin-top: 2px;
}

.hm1516-map-status {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 22px;
  margin: 12px 0 0;
  color: #687873;
  font-size: 13px;
  line-height: 1.45;
}

.hm1516-map-status::before {
  content: "";
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #91aaa2;
}

.hm1516-map-status[data-state="loading"]::before {
  background: #e7a53d;
  box-shadow: 0 0 0 5px rgba(231, 165, 61, .14);
  animation: hm1516Pulse 1.15s ease-in-out infinite;
}

.hm1516-map-status[data-state="success"] {
  color: #176f5e;
}

.hm1516-map-status[data-state="success"]::before {
  background: #1b9a7d;
}

.hm1516-map-status[data-state="warning"] {
  color: #8a5b12;
}

.hm1516-map-status[data-state="warning"]::before {
  background: #e4a23a;
}

@keyframes hm1516Pulse {
  0%, 100% { transform: scale(.92); opacity: .7; }
  50% { transform: scale(1.18); opacity: 1; }
}

.hm1516-report-filters {
  display: grid;
  grid-template-columns: minmax(190px, 1.3fr) repeat(3, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
  margin: 0 0 16px;
  padding: 16px;
  border: 1px solid #d4e3de;
  border-radius: 16px;
  background: linear-gradient(145deg, #f8fbfa 0%, #f1f7f5 100%);
}

.hm1516-report-filters label {
  display: grid;
  gap: 7px;
  min-width: 0;
  color: #29443c;
  font-size: 12px;
  font-weight: 800;
}

.hm1516-report-filters input,
.hm1516-report-filters select {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 0 12px;
  color: #152a24;
  border: 1px solid #bcd2cb;
  border-radius: 11px;
  background-color: #fff;
  font: inherit;
  font-weight: 650;
}

.hm1516-filter-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
}

.hm1516-filter-actions .hm157-secondary {
  min-height: 42px;
  padding: 0 15px;
}

.hm1516-filter-actions a {
  color: #526b64;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.hm1516-filter-actions a:hover {
  color: #0b5749;
  text-decoration: underline;
}

.hm1516-report-list-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: 0 0 12px;
  padding: 0 2px;
}

.hm1516-report-list-head strong {
  color: #18332c;
  font-size: 14px;
}

.hm1516-report-list-head span {
  color: #72817c;
  font-size: 12px;
}

.hm1516-report-list {
  display: grid;
  gap: 12px;
}

.hm1516-report-card {
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 18px !important;
  padding: 18px !important;
  border-left: 4px solid #467fc2 !important;
  background: #fff !important;
}

.hm1516-report-card h3 {
  margin-top: 8px !important;
  margin-bottom: 7px !important;
}

.hm1516-distance-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 10px;
}

.hm1516-distance-chips span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 850;
}

.hm1516-distance-chips .is-water {
  color: #155f8e;
  background: #e6f3fb;
}

.hm1516-distance-chips .is-protected {
  color: #276e3d;
  background: #e8f5e9;
}

.hm1516-distance-chips .is-map {
  color: #70451a;
  background: #fff0d9;
}

.hm1516-report-actions {
  display: flex !important;
  flex-direction: column;
  align-items: stretch !important;
  justify-content: center;
  gap: 9px;
  min-width: 154px;
}

.hm1516-report-actions form {
  margin: 0;
}

.hm1516-delete-report {
  width: 100%;
  min-height: 40px;
  padding: 0 13px;
  color: #9b342e;
  border: 1px solid #e4b9b5;
  border-radius: 11px;
  background: #fff8f7;
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 850;
}

.hm1516-delete-report:hover,
.hm1516-delete-report:focus-visible {
  color: #fff;
  border-color: #a83b34;
  background: #a83b34;
}

.hm1516-export-excel {
  position: relative;
  border-color: #8abf78 !important;
  background: linear-gradient(145deg, #f4fbf0 0%, #e7f5df 100%) !important;
}

.hm1516-export-excel::before {
  content: "X";
  display: inline-grid;
  place-items: center;
  width: 23px;
  height: 23px;
  margin-right: 7px;
  color: #fff;
  border-radius: 6px;
  background: #2e7d32;
  font-size: 11px;
  font-weight: 900;
}

.hm1511-export-stack .hm1516-export-excel {
  display: flex;
  align-items: center;
}

@media (max-width: 1120px) {
  .hm1516-report-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hm1516-filter-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .hm1516-report-filters {
    grid-template-columns: 1fr;
    padding: 13px;
  }
  .hm1516-filter-actions {
    grid-column: auto;
    justify-content: space-between;
  }
  .hm1516-report-list-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .hm1516-report-card {
    grid-template-columns: 1fr !important;
  }
  .hm1516-report-actions {
    min-width: 0;
    width: 100%;
  }
  .hm1516-report-actions .hm157-primary,
  .hm1516-delete-report {
    width: 100%;
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm1516-map-status[data-state="loading"]::before { animation: none; }
}

/* PATCH 2.6 - formular raport si spatiere carduri. */
.hm1516-report-form .hm157-form-grid {
  display: grid !important;
  grid-template-columns: minmax(260px, .9fr) minmax(360px, 1.4fr) !important;
  gap: 18px 22px !important;
  align-items: start !important;
}
.hm1516-report-form .hm157-form-grid > label {
  min-width: 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}
.hm1516-report-form .hm157-form-grid > label:nth-child(3) {
  grid-column: 1 / -1 !important;
}
.hm1516-report-form select,
.hm1516-report-form textarea,
.hm1516-report-form .hm1513-select,
.hm1516-report-form .hm1513-select-trigger,
.hm1516-report-form .hm1513-select-menu {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.hm1516-report-form textarea {
  min-height: 132px !important;
  resize: vertical;
}
.hm1516-report-card {
  align-items: start !important;
}
.hm1516-report-card > div:first-child {
  min-width: 0;
  padding-right: 4px;
}
.hm1516-report-card .hm158-note {
  margin-top: 14px !important;
  padding: 17px 19px !important;
  line-height: 1.6 !important;
  border-radius: 0 14px 14px 0 !important;
}
.hm1516-report-actions {
  align-self: start !important;
  padding-top: 4px;
}
@media (max-width: 820px) {
  .hm1516-report-form .hm157-form-grid {
    grid-template-columns: 1fr !important;
  }
  .hm1516-report-form .hm157-form-grid > label:nth-child(3) {
    grid-column: auto !important;
  }
}
