:root{
  --bg: #ffffff;
  --panel: #fefaf3;
  --muted: #6b7280;
  --text: #111827;
  --border: rgba(17,24,39,.10);
  --shadow: 0 2px 6px 0 rgba(0, 0, 0, 0.1);
  --radius: var(--radius-m, clamp(1rem, calc(-0.19vw + 1.26rem), 1.2rem));

  --accent: #d11f2a;
  --accent2: #111827;
  --soft: rgba(209,31,42,.10);
}

.trm-locator{
  display:grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
  align-items:start;
  color: var(--bricks-color-1d5a31, var(--text));
  font-family: "Noto Sans", sans-serif;
  font-size: 18px;
}

.trm-locator__panel,
.trm-locator__mapcard{
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.trm-locator__panel{ padding: 22px; }
.trm-locator__mapcard{ overflow:hidden; }

.trm-locator__header{ margin-bottom: 14px; }
.trm-locator__title{
  margin: 0 0 6px;
  font-size: 22px;
  line-height: 1.2;
  color: var(--text);
}
.trm-locator__subtitle{
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.trm-form{
  display:grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) - 6px);
  background: linear-gradient(180deg, rgba(17,24,39,.02), transparent);
  margin: 14px 0 14px;
}

.trm-form__row{
  display:grid;
  gap: 6px;
}
.trm-label{
  font-size: 12px;
  color: var(--muted);
}

.trm-inputwrap{ position:relative; }
.trm-input,
.trm-select{
  width:100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 12px;
  font-size: 14px;
  background: #fff;
  color: var(--text);
  outline: none;
}
.trm-input:focus,
.trm-select:focus{
  border-color: rgba(209,31,42,.45);
  box-shadow: 0 0 0 4px var(--soft);
}

.trm-form__actions{
  display:flex;
  gap: 10px;
  flex-wrap: wrap;
}

.trm-btn{
  appearance:none;
  border: 2px solid var(--bricks-color-rgkhou, var(--accent));
  background-color: var(--bricks-color-rgkhou, var(--accent));
  color: var(--bricks-color-szyemw, #fff);
  border-radius: var(--radius-s, clamp(0.6rem, calc(-0.19vw + 0.86rem), 0.8rem));
  padding: 11px 14px;
  font-size: var(--text-m, 14px);
  font-weight: 700;
  cursor: pointer;
  transition: transform .06s ease, filter .15s ease;
}
.trm-btn:hover{
  filter: none;
  background-color: var(--bricks-color-szyemw, #fff);
  color: var(--bricks-color-rgkhou, var(--accent));
  border-color: var(--bricks-color-rgkhou, var(--accent));
}
.trm-btn:active{ transform: translateY(1px); }

.trm-btn--ghost{
  background: #fff;
  color: var(--bricks-color-rgkhou, var(--accent));
  border-color: var(--bricks-color-rgkhou, var(--accent));
}

.trm-btn--ghost:hover{
  background-color: var(--bricks-color-rgkhou, var(--accent));
  color: var(--bricks-color-szyemw, #fff);
  border-color: var(--bricks-color-rgkhou, var(--accent));
}

.trm-form__meta{
  font-size: 12px;
  color: var(--muted);
  min-height: 0;
  line-height: 1.3;
}

.trm-form__meta:empty{
  display: none;
}

.trm-form__meta.is-empty{
  display: none;
}

.trm-results__head{
  display:flex;
  justify-content: space-between;
  align-items:flex-end;
  gap: 12px;
  margin: 6px 0 10px;
}

.trm-results__count{
  font-size: 12px;
  color: var(--muted);
}

.trm-results{
  display:grid;
  gap: 10px;
}

.trm-card{
  border: 1px solid var(--border);
  border-radius: var(--radius-m, clamp(1rem, calc(-0.19vw + 1.26rem), 1.2rem));
  padding: 14px;
  background: #fff;
  transition: box-shadow .15s ease, border-color .15s ease, transform .06s ease;
  cursor: pointer;
}
.trm-card:hover{
  border-color: rgba(17,24,39,.18);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);
}
.trm-card.is-active{
  border-color: rgba(209,31,42,.55);
  box-shadow: 0 0 0 3px var(--soft), 0 3px 8px rgba(0, 0, 0, 0.10);
}

.trm-card__top{
  display:flex;
  justify-content: space-between;
  gap: 10px;
  align-items:flex-start;
}
.trm-card__title{
  font-weight: 800;
  color: var(--text);
  font-size: 15px;
  line-height: 1.25;
  margin: 0;
}
.trm-chip{
  font-size: 12px;
  color: var(--accent);
  background: var(--soft);
  border: 1px solid rgba(209,31,42,.18);
  padding: 6px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.trm-card__meta{
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted);
  display:grid;
  gap: 2px;
}

.trm-map{
  height: 560px;
  width: 100%;
}

.trm-locator__mapcard .leaflet-container{
  border-radius: var(--radius) var(--radius) 0 0;
}
.trm-locator__mapcard .leaflet-control-zoom a{
  border-radius: 10px;
}

.trm-marker{
  background: transparent;
  border: 0;
  color: #7f8794;
}

.trm-marker.is-active{
  color: var(--bricks-color-rgkhou, var(--accent));
}

.trm-marker__svg{
  display: block;
  width: 24px;
  height: 36px;
  filter: drop-shadow(0 3px 8px rgba(17,24,39,.30));
}

.trm-marker__icon{
  display: block;
  width: 24px;
  height: 36px;
}

.trm-marker__shape{
  fill: currentColor;
  stroke: rgba(17,24,39,.32);
  stroke-width: 1.2;
}

.trm-marker__center{
  fill: #fff;
}

.trm-maphint{
  padding: 14px;
  border-top: 1px solid var(--border);
  background: rgba(17,24,39,.02);
}
.trm-maphint strong{ color: var(--text); }

.trm-detail__empty {
  opacity: 0.85;
}

.trm-detail-title{
  margin: 0;
  font-family: "Jost", sans-serif;
  font-weight: 700;
  color: var(--bricks-color-rgkhou, var(--accent));
  line-height: 1.25;
}

.trm-detail-subline{
  opacity: .8;
  margin-top: 4px;
}

.trm-detail-row{
  margin-top: 10px;
}

.trm-detail-section{
  margin-top: 26px;
  padding-top: 6px;
  border-top: 0;
}

.trm-detail-contact{
  display: flex;
  align-items: center;
  gap: 8px;
}

.trm-contact-icon{
  display: inline-flex;
  width: 20px;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.trm-detail-link{
  color: var(--bricks-color-rgkhou, var(--accent));
  text-decoration: underline;
  word-break: break-word;
}

@media (max-width: 1024px){
  .trm-locator{ grid-template-columns: 1fr; }
  .trm-map{ height: 440px; }
}
@media (max-width: 640px){
  .trm-locator__panel{ padding: 16px; }
  .trm-form{ padding: 12px; }
  .trm-map{ height: 320px; }
}
