/* HM-038 — Türkiye İlaçlama Firmaları Haritası v0.5
   Namespace: .hm-pco | Mobile-first | AKINSOFT-safe */
.hm-pco {
  --hm-green-900: #24483a;
  --hm-green-700: #386b55;
  --hm-green-100: #e9f1ec;
  --hm-cream: #faf6ec;
  --hm-orange: #ee9a4b;
  --hm-orange-soft: #f8e2c9;
  --hm-ink: #24312b;
  --hm-muted: #65716b;
  --hm-line: #d9e1dc;
  --hm-white: #fff;
  --hm-shadow: 0 12px 32px rgba(36,72,58,.075);
  --hm-radius: 18px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 12px 48px;
  color: var(--hm-ink);
  font: inherit;
  box-sizing: border-box;
}
.hm-pco *, .hm-pco *::before, .hm-pco *::after { box-sizing: inherit; }
.hm-pco a { color: inherit; }
.hm-pco h1, .hm-pco h2, .hm-pco h3, .hm-pco p { margin-top: 0; }

.hm-pco__hero {
  display: grid;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  background: linear-gradient(135deg,var(--hm-cream),#fff 66%,var(--hm-green-100));
  box-shadow: var(--hm-shadow);
}
.hm-pco__eyebrow, .hm-pco__results-kicker {
  margin: 0 0 6px;
  color: var(--hm-green-700);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.hm-pco h1 {
  margin-bottom: 9px;
  font-size: clamp(23px,3.2vw,31px);
  line-height: 1.16;
  letter-spacing: -.018em;
}
.hm-pco h2 {
  margin-bottom: 6px;
  font-size: clamp(17px,2.1vw,21px);
  line-height: 1.28;
}
.hm-pco__lead {
  max-width: 760px;
  margin-bottom: 0;
  color: var(--hm-muted);
  font-size: clamp(14px,1.7vw,16px);
  line-height: 1.6;
}
.hm-pco__stats { display: flex; gap: 8px; align-items: stretch; }
.hm-pco__stat {
  min-width: 82px;
  padding: 10px 12px;
  border-radius: 13px;
  background: rgba(255,255,255,.84);
  border: 1px solid var(--hm-line);
}
.hm-pco__stat strong { display: block; color: var(--hm-green-900); font-size: 21px; line-height: 1; }
.hm-pco__stat span { display: block; margin-top: 4px; color: var(--hm-muted); font-size: 11px; }

.hm-pco__finder { margin-top: 16px; }
.hm-pco__controls {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--hm-line);
  border-radius: 15px;
  background: var(--hm-white);
  box-shadow: 0 7px 20px rgba(36,72,58,.05);
}
.hm-pco__field { display: grid; gap: 5px; }
.hm-pco__field > span { font-size: 11px; font-weight: 800; color: var(--hm-green-900); }
.hm-pco__field select, .hm-pco__field input {
  width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid #cfd9d3; border-radius: 10px;
  background: #fff; color: var(--hm-ink); font: inherit; font-size: 14px; outline: none;
}
.hm-pco__field select:focus, .hm-pco__field input:focus { border-color: var(--hm-green-700); box-shadow: 0 0 0 3px rgba(56,107,85,.11); }
.hm-pco__reset { min-height: 44px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--hm-green-100); color: var(--hm-green-900); font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }

.hm-pco__workspace { display: grid; gap: 14px; margin-top: 14px; }
.hm-pco__map-column, .hm-pco__results {
  border: 1px solid var(--hm-line);
  border-radius: var(--hm-radius);
  background: var(--hm-white);
  box-shadow: var(--hm-shadow);
  overflow: hidden;
}
.hm-pco__map-head, .hm-pco__results-head {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 15px 15px 10px;
}
.hm-pco__map-head p { margin-bottom: 0; color: var(--hm-muted); font-size: 12px; line-height: 1.45; }
.hm-pco__map-head-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 7px; }
.hm-pco__mode, .hm-pco__count {
  flex: 0 0 auto; padding: 5px 8px; border-radius: 999px; background: var(--hm-orange-soft); color: #7b4615; font-size: 10px; font-weight: 800;
}
.hm-pco__map-expand {
  display: inline-flex; min-height: 34px; align-items: center; padding: 0 10px; border: 1px solid var(--hm-line); border-radius: 9px;
  background: #fff; color: var(--hm-green-900); font: inherit; font-size: 11px; font-weight: 800; cursor: pointer;
}
.hm-pco__map-wrap { position: relative; padding: 6px 10px 10px; background: linear-gradient(180deg,#fff,var(--hm-cream)); }
.hm-pco__map-stage {
  position: relative; min-height: 235px; display: grid; place-items: center; overflow: hidden; border-radius: 12px;
}
.hm-pco__map-loading { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: var(--hm-muted); font-size: 12px; }
.hm-pco__map { width: 100%; }
.hm-pco__map svg { display: block; width: 100%; height: auto; max-height: 540px; margin: auto; }
.hm-pco__map svg path, .hm-pco__map svg polygon, .hm-pco__map svg g[data-province] {
  transition: fill .15s ease, opacity .15s ease, filter .15s ease, stroke .15s ease;
}
.hm-pco__province { fill: #edf2ef !important; stroke: #fff !important; stroke-width: 1 !important; cursor: pointer; outline: none; }
.hm-pco__province:hover, .hm-pco__province:focus { filter: drop-shadow(0 1px 2px rgba(36,72,58,.2)); stroke: #f7faf8 !important; }
.hm-pco__province--level-1 { fill: #b9d2c3 !important; }
.hm-pco__province--level-2 { fill: #83ad95 !important; }
.hm-pco__province--level-3 { fill: #4f8067 !important; }
.hm-pco__province--active,
.hm-pco__province--active.hm-pco__province--level-1,
.hm-pco__province--active.hm-pco__province--level-2,
.hm-pco__province--active.hm-pco__province--level-3 { fill: var(--hm-orange) !important; }
.hm-pco__tooltip { position: fixed; z-index: 999999; pointer-events: none; padding: 6px 8px; border-radius: 8px; background: #183328; color: #fff; font-size: 11px; box-shadow: 0 5px 15px rgba(0,0,0,.15); }
.hm-pco__map-tools {
  display: none; position: absolute; z-index: 4; top: 10px; right: 10px; gap: 6px; align-items: center;
}
.hm-pco__map-tools button {
  min-width: 38px; height: 38px; padding: 0 10px; border: 1px solid var(--hm-line); border-radius: 9px; background: rgba(255,255,255,.96);
  color: var(--hm-green-900); font: inherit; font-size: 18px; font-weight: 800; box-shadow: 0 4px 12px rgba(36,72,58,.08); cursor: pointer;
}
.hm-pco__map-tools .hm-pco__map-fit, .hm-pco__map-tools .hm-pco__map-close { font-size: 11px; }
.hm-pco__map-fallback { margin: 0; padding: 0 15px 15px; color: var(--hm-muted); font-size: 12px; }
.hm-pco__legend {
  display: flex; flex-wrap: wrap; gap: 7px 11px; padding: 9px 15px 13px; border-top: 1px solid rgba(217,225,220,.7); color: var(--hm-muted); font-size: 10px;
}
.hm-pco__legend span { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.hm-pco__legend-dot { width: 9px; height: 9px; border-radius: 3px; border: 1px solid rgba(36,72,58,.08); background: #edf2ef; }
.hm-pco__legend-dot--1 { background: #b9d2c3; }
.hm-pco__legend-dot--2 { background: #83ad95; }
.hm-pco__legend-dot--3 { background: #4f8067; }
.hm-pco__legend-dot--selected { background: var(--hm-orange); }

.hm-pco__results { min-height: 260px; }
.hm-pco__results-head { border-bottom: 1px solid var(--hm-line); }
.hm-pco__cards { display: grid; gap: 9px; padding: 10px; }
.hm-pco__card { padding: 13px; border: 1px solid var(--hm-line); border-radius: 13px; background: #fff; }
.hm-pco__card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 9px; }
.hm-pco__card h3 { margin: 0; color: var(--hm-green-900); font-size: 14px; line-height: 1.35; }
.hm-pco__badge { flex: 0 0 auto; padding: 4px 7px; border-radius: 999px; background: var(--hm-green-100); color: var(--hm-green-900); font-size: 9px; font-weight: 800; }
.hm-pco__location, .hm-pco__address { margin: 7px 0 0; color: var(--hm-muted); font-size: 12px; line-height: 1.5; }
.hm-pco__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hm-pco__action { display: inline-flex; min-height: 34px; align-items: center; padding: 0 10px; border: 1px solid var(--hm-line); border-radius: 9px; text-decoration: none; font-size: 11px; font-weight: 800; background: var(--hm-cream); }
.hm-pco__action--primary { background: var(--hm-green-900); border-color: var(--hm-green-900); color: #fff !important; }
.hm-pco__empty { display: grid; gap: 5px; padding: 20px 15px; color: var(--hm-muted); font-size: 13px; }

.hm-pco__info { display: grid; gap: 12px; margin-top: 16px; }
.hm-pco__info article, .hm-pco__notice { padding: 18px; border: 1px solid var(--hm-line); border-radius: 15px; background: var(--hm-cream); }
.hm-pco__info p, .hm-pco__notice p { margin-bottom: 0; color: var(--hm-muted); font-size: 13px; line-height: 1.62; }
.hm-pco__cta { display: inline-flex; margin-top: 12px; padding: 9px 12px; border-radius: 9px; background: var(--hm-green-900); color: #fff !important; text-decoration: none; font-size: 12px; font-weight: 800; }
.hm-pco__notice { margin-top: 12px; background: #fff; font-size: 13px; }
.hm-pco__status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Mobil: sayfa dikey kalır; harita istenirse tam ekran dikey görünümde büyütülür. */
.hm-pco__map-column--fullscreen {
  position: fixed !important;
  inset: 0;
  z-index: 999999;
  width: 100vw;
  height: 100dvh;
  border: 0 !important;
  border-radius: 0 !important;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: none !important;
}
.hm-pco__map-column--fullscreen .hm-pco__map-head {
  flex: 0 0 auto;
  padding: max(12px,env(safe-area-inset-top)) 12px 9px;
  border-bottom: 1px solid var(--hm-line);
  background: #fff;
}
.hm-pco__map-column--fullscreen .hm-pco__map-head h2 { font-size: 16px; }
.hm-pco__map-column--fullscreen .hm-pco__map-head p { font-size: 11px; }
.hm-pco__map-column--fullscreen .hm-pco__mode,
.hm-pco__map-column--fullscreen .hm-pco__map-expand { display: none !important; }
.hm-pco__map-column--fullscreen .hm-pco__map-wrap {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg,#fff,var(--hm-cream));
}
.hm-pco__map-column--fullscreen .hm-pco__map-tools { display: flex; }
.hm-pco__map-column--fullscreen .hm-pco__map-stage {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 72px 12px 18px;
  display: block;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  border-radius: 0;
}
.hm-pco__map-column--fullscreen .hm-pco__map { min-width: 100%; min-height: 100%; display: grid; place-items: center; }
.hm-pco__map-column--fullscreen .hm-pco__map svg { max-width: none; max-height: none; }
.hm-pco__map-column--fullscreen .hm-pco__legend { flex: 0 0 auto; padding: 8px 12px max(10px,env(safe-area-inset-bottom)); background: #fff; }
body.hm-pco-map-open { overflow: hidden !important; touch-action: none; }

@media (min-width: 720px) {
  .hm-pco { padding-inline: 18px; }
  .hm-pco__hero { grid-template-columns: 1fr auto; align-items: end; padding: 24px 26px; }
  .hm-pco__controls { grid-template-columns: minmax(180px,.7fr) minmax(260px,1.3fr) auto; align-items: end; }
  .hm-pco__info { grid-template-columns: 1fr 1fr; }
  .hm-pco__map-expand { display: none; }
  .hm-pco__map-stage { min-height: 330px; }
}
@media (min-width: 980px) {
  .hm-pco__workspace { grid-template-columns: minmax(0,1.55fr) minmax(330px,.75fr); align-items: stretch; }
  .hm-pco__map-stage { min-height: 500px; }
  .hm-pco__results { min-height: 590px; }
  .hm-pco__cards { max-height: 650px; overflow: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .hm-pco *, .hm-pco *::before, .hm-pco *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* HM-038 v0.5 — 18.09.2026 düzeltme paketi */
.hm-pco__field input::placeholder {
  color: #a7b0ab;
  opacity: .62;
}
.hm-pco__legend-dot {
  display: inline-block !important;
  flex: 0 0 10px !important;
  width: 10px !important;
  min-width: 10px !important;
  height: 10px !important;
  min-height: 10px !important;
  border-radius: 3px !important;
  visibility: visible !important;
  opacity: 1 !important;
}
.hm-pco__legend-dot--0 { background: #edf2ef !important; }
.hm-pco__legend-dot--1 { background: #b9d2c3 !important; }
.hm-pco__legend-dot--2 { background: #83ad95 !important; }
.hm-pco__legend-dot--3 { background: #4f8067 !important; }
.hm-pco__legend-dot--selected { background: var(--hm-orange) !important; }

.hm-pco__final {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, .42fr);
  min-height: 178px;
  margin-top: 16px;
  overflow: hidden;
  border: 1px solid rgba(36,72,58,.12);
  border-radius: var(--hm-radius);
  background:
    radial-gradient(circle at 78% 34%, rgba(255,255,255,.28), transparent 28%),
    linear-gradient(112deg, #183d31 0%, #2e6650 47%, #e4d29a 78%, #f5eac6 100%);
  box-shadow: var(--hm-shadow);
}
.hm-pco__final-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 650px;
  padding: 24px 22px;
  color: #fff;
}
.hm-pco__final-eyebrow {
  margin: 0 0 6px;
  color: rgba(255,255,255,.76);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}
.hm-pco__final h2 {
  margin: 0 0 7px;
  color: #fff;
  font-size: clamp(18px,2.2vw,23px);
  line-height: 1.25;
}
.hm-pco__final-copy > p:last-child {
  max-width: 560px;
  margin: 0;
  color: rgba(255,255,255,.84);
  font-size: 13px;
  line-height: 1.58;
}
.hm-pco__final-figure {
  position: relative;
  align-self: stretch;
  min-height: 178px;
  background: none !important;
}
.hm-pco__final-figure::before {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: 20px;
  bottom: -46px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
}
.hm-pco__final-figure .hm-pco__final-img {
  display: block !important;
  position: absolute !important;
  z-index: 3 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: none !important;
  object-fit: contain !important;
  object-position: right bottom !important;
  opacity: 1 !important;
  visibility: visible !important;
}

@media (max-width: 719px) {
  /* Mobil firma listesi: başlık sabit kalır, kartlar kendi alanında scroll olur. */
  .hm-pco__results {
    min-height: 0;
    max-height: min(66vh, 620px);
    display: flex;
    flex-direction: column;
  }
  .hm-pco__results-head {
    flex: 0 0 auto;
    background: #fff;
  }
  .hm-pco__cards {
    flex: 1 1 auto;
    min-height: 0;
    max-height: min(56vh, 520px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(56,107,85,.35) transparent;
  }
  .hm-pco__cards::-webkit-scrollbar { width: 6px; }
  .hm-pco__cards::-webkit-scrollbar-track { background: transparent; }
  .hm-pco__cards::-webkit-scrollbar-thumb {
    background: rgba(56,107,85,.32);
    border-radius: 999px;
  }
  .hm-pco__empty {
    flex: 1 1 auto;
    overflow: auto;
  }

  .hm-pco__final {
    grid-template-columns: minmax(0,1fr) 112px;
    min-height: 164px;
  }
  .hm-pco__final-copy { padding: 20px 16px; }
  .hm-pco__final-copy > p:last-child { font-size: 12px; }
  .hm-pco__final-figure { min-height: 164px; }
  .hm-pco__final-figure .hm-pco__final-img { right: -4px !important; height: 158px !important; width: auto !important; }
  .hm-pco__final-figure::before { width: 120px; height: 120px; right: -4px; bottom: -32px; }
}
