/* ==========================================================================
   KirpiGlobal - matcher.css
   Variant seçimi səhifəsi. Rənglər və ölçülər styles.css-dəki :root dəyişənlərindəndir.
   ========================================================================== */

/* "Etibarlı" qrupunun rəngi. Qalan rənglər styles.css-dəki :root-dan gəlir. */
:root {
  --safe: #3B82C4;
  --safe-dark: #2C6AA6;
}

.mt-body {
  background-color: var(--mist);
}

.mt-main {
  padding: 40px 0 72px;
}

.mt-head {
  margin-bottom: 28px;
}

.mt-title {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
}

.mt-lead {
  margin-top: 14px;
  font-size: 18px;
  color: var(--muted);
  max-width: 640px;
}

.mt-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 24px;
  align-items: start;
}

.mt-field-card,
.mt-steps-card,
.mt-block {
  background-color: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

/* Sahə sağda, həmişə görünən */
.mt-field-card {
  order: 2;
  position: sticky;
  top: calc(var(--header-height) + 16px);
  /* Kart ekrandan hündür olarsa (çox variant, açıq izah) altındakı hissə əlçatmaz qalmasın: kartın içində sürüşür */
  max-height: calc(100vh - var(--header-height) - 32px);
  overflow-y: auto;
}

.mt-count {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
}

.mt-delta {
  min-height: 22px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 12px;
}

.mt-field {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mt-gap, 6px);
}

.mt-sq {
  width: var(--mt-sq, 26px);
  height: var(--mt-sq, 26px);
  padding: 0;
  border: 1px solid var(--orange-dark);
  border-radius: 22%;
  background-color: var(--orange);
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

/* Xəritə görünüşü: eyni düymələr kvadrat yox, xəritənin üstündə kiçik, işıq saçan nöqtədir.
   Yeri faizlə, ölçüsü xəritənin eninə görə verilir, ona görə hər ekranda eyni düzülür. */
.mt-field--map {
  display: block;
}

.mt-map {
  position: relative;
}

.mt-map[hidden],
.mt-map-note[hidden],
.mt-rest[hidden],
.mt-rest-label[hidden] {
  display: none;
}

.mt-map-note {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.mt-map-svg {
  display: block;
  width: 100%;
  height: auto;
}

.mt-map-land {
  fill: var(--line);
  fill-opacity: 0.5;
}

.mt-map-borders {
  fill: none;
  stroke: var(--white);
  stroke-width: 1px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mt-map-pick {
  fill: var(--blue);
  fill-opacity: 0.12;
  stroke: var(--navy);
  stroke-width: 1.5px;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.mt-map .mt-sq {
  position: absolute;
  width: 0.68%;
  height: auto;
  aspect-ratio: 1;
  min-width: 2.5px;
  border-width: 0;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

/* Yanan nöqtənin ətrafında öz rəngində işıq halqası; sönəndə halqa da itir */
.mt-map .mt-sq--open { box-shadow: 0 0 5px 1px color-mix(in srgb, var(--safe) 75%, transparent); }
.mt-map .mt-sq--competitive { box-shadow: 0 0 5px 1px color-mix(in srgb, var(--orange) 75%, transparent); }
.mt-map .mt-sq--highly_competitive { box-shadow: 0 0 5px 1px color-mix(in srgb, var(--navy) 55%, transparent); }

.mt-map .mt-sq.is-off,
.mt-rest .mt-sq.is-off {
  border-width: 1px;
  background-color: var(--white);
  border-color: var(--line);
  box-shadow: none;
}

.mt-map .mt-sq.is-selected,
.mt-map .mt-sq:focus-visible {
  z-index: 1;
}

.mt-rest-label {
  margin: 14px 0 6px;
  font-size: 13px;
  color: var(--muted);
}

.mt-rest {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mt-rest .mt-sq {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.mt-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 6px;
  border: 1px solid var(--line);
  border-radius: 22%;
  background-color: var(--mist);
  vertical-align: -1px;
}

/* Üç qrupun rəngi: kvadratlar, izah və nəticə blokları eyni rəngdən istifadə edir */
.mt-sq--open,
.mt-swatch--open {
  background-color: var(--safe);
  border-color: var(--safe-dark);
}

.mt-sq--competitive,
.mt-swatch--competitive {
  background-color: var(--orange);
  border-color: var(--orange-dark);
}

.mt-sq--highly_competitive,
.mt-swatch--highly_competitive {
  background-color: var(--navy);
  border-color: var(--navy);
}

.mt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--muted);
}

.mt-legend strong {
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

.mt-explain {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.mt-explain summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--blue);
}

.mt-explain dl {
  margin: 8px 0;
}

.mt-explain dt {
  margin-top: 8px;
  font-weight: 600;
  color: var(--navy);
}

.mt-explain dd {
  margin: 0;
}

.mt-bank-link {
  margin: 4px 0 0;
  font-size: 14px;
}

.mt-bank-link a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.mt-sq.is-off {
  background-color: var(--mist);
  border-color: var(--line);
}

.mt-sq.is-selected {
  outline: 3px solid var(--navy);
  outline-offset: 1px;
}

.mt-sq:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 1px;
}

.mt-detail {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  background-color: var(--mist);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.mt-detail strong {
  color: var(--navy);
}

.mt-ok {
  color: var(--blue);
  font-weight: 600;
}

.mt-no {
  color: var(--error);
}

/* Suallar */
.mt-progress {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 10px;
}

.mt-q {
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 6px;
}

.mt-hint {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 14px;
}

.mt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.mt-chip {
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-btn);
  background-color: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mt-chip[aria-pressed="true"] {
  background-color: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.mt-chip:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.mt-inputs {
  display: grid;
  gap: 4px;
  max-width: 340px;
}

/* İki sahə yan-yana: ÜOMG və şkala, sertifikat və bal */
.mt-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 8px;
}

#in-eng-pair {
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
}

#in-eng-pair.is-single {
  grid-template-columns: minmax(0, 1fr);
}

.mt-hint-small {
  margin: 6px 0 0;
  font-size: 13px;
}

.mt-range {
  display: grid;
  grid-template-columns: 76px 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
  color: var(--muted);
}

.mt-range input {
  width: 100%;
  accent-color: var(--orange);
}

.mt-range-out {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 600;
  color: var(--navy);
  margin: 10px 0 16px;
}

.mt-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  color: var(--navy);
  cursor: pointer;
}

.mt-check input {
  width: 20px;
  height: 20px;
  accent-color: var(--navy);
}

.mt-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
}

.mt-nav .btn-primary {
  margin-left: auto;
}

/* .btn display qaydası hidden atributunu üstələyirdi: ilk sualda "Geri" görünürdü */
.mt-nav [hidden] {
  display: none;
}

/* Nəticə */
.mt-result {
  margin-top: 40px;
  scroll-margin-top: calc(var(--header-height) + 16px);
}

.mt-blocks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.mt-block-title {
  font-size: 22px;
}

.mt-block-desc {
  font-size: 14px;
  color: var(--muted);
  margin: 4px 0 16px;
}

/* Kart kliklənəndir: basanda konsultasiya pəncərəsi açılır */
.mt-card {
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: var(--white);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

/* Hover: kart yuxarı qalxır, kölgə, haşiyə; alt yazı tünd göy və altından xətli (narıncı mətn ağ fonda qadağandır) */
@media (hover: hover) {
  .mt-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--blue);
  }

  .mt-card:hover .mt-card-cta {
    color: var(--navy);
    text-decoration: underline;
  }
}

/* Telefonda :hover yoxdur: basılı vəziyyət eyni görünür */
.mt-card:active {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--blue);
  transition-duration: 0.05s;
}

.mt-card:active .mt-card-cta {
  color: var(--navy);
  text-decoration: underline;
}

.mt-card:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

.mt-card-cta {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 4px;
  padding: 0;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
}

.mt-card-source {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 12px;
  margin-top: 6px;
  margin-bottom: 0;
  font-size: 13px;
  color: var(--muted);
}

.mt-card-source a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
}

.mt-card-name {
  font-size: 16px;
  line-height: 1.3;
}

.mt-card-meta {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin: 2px 0 6px;
}

.mt-card-line,
.mt-card-basis,
.mt-empty {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}

.mt-card-line {
  color: var(--navy);
}

.mt-card-basis {
  margin-top: 6px;
}

.mt-card-note {
  margin-top: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background-color: var(--orange-soft);
  font-size: 14px;
  line-height: 1.45;
  color: var(--navy);
}

.mt-more {
  width: 100%;
  margin-top: 12px;
}

.mt-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
}

.mt-whatif {
  margin-top: 24px;
  padding: 20px 24px;
  border-radius: var(--radius-card);
  background-color: var(--orange-soft);
}

.mt-whatif-title {
  font-size: 18px;
  margin-bottom: 8px;
}

.mt-whatif-line {
  font-size: 16px;
  color: var(--navy);
  padding: 3px 0;
}

.mt-share {
  margin-top: 24px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background-color: var(--white);
}

.mt-share-title {
  font-size: 18px;
  margin-bottom: 4px;
}

.mt-share-help {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}

.mt-share-status {
  min-height: 22px;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.mt-share-input {
  margin-top: 8px;
}

.mt-share-input[hidden] {
  display: none;
}

.mt-cta {
  margin-top: 28px;
  text-align: center;
}

.mt-cta p {
  font-size: 14px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 16px;
}

/* Konsultasiya pəncərəsində formanın üstündəki qeyd: nə göndəriləcəyi görünür */
.consult-note {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background-color: var(--mist);
  font-size: 14px;
  line-height: 1.5;
  color: var(--navy);
}

.consult-note p + p,
.consult-note-details {
  margin-top: 6px;
}

.consult-note-variant {
  font-weight: 600;
}

.consult-note-answers {
  color: var(--muted);
}

.consult-note-details summary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}

.consult-note-details ul {
  list-style: none;
  padding: 0 0 4px;
  display: grid;
  gap: 4px;
  overflow-wrap: anywhere;
}

/* Planşet və telefon: sahə yuxarıda yapışqan, suallar altında */
@media (max-width: 900px) {
  /* Şəbəkə yox, sütun: yapışqan zolaq bütün səhifə boyu yapışsın (şəbəkədə yalnız öz xanasında yapışır) */
  .mt-layout {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
  }

  /* Variant sayı çox olanda sahə hündürdür: yalnız say zolağı yapışqan qalır,
     kvadratlar səhifə ilə birlikdə sürüşür. Kart öz qutusunu itirir, uşaqları şəbəkədə yerləşir. */
  .mt-field-card {
    display: contents;
  }

  .mt-bar {
    order: 0;
    position: sticky;
    top: var(--header-height);
    z-index: 5;
    padding: 8px 16px;
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius-card) var(--radius-card);
  }

  .mt-field-body {
    order: 1;
    padding: 14px 16px;
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
  }

  .mt-steps-card {
    order: 2;
  }

  .mt-count {
    font-size: 17px;
    line-height: 1.3;
  }

  /* Say dəyişməsi xəbəri ekranda yer tutmur, oxuyucu üçün qalır */
  .mt-delta {
    position: absolute;
    width: 1px;
    height: 1px;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }

  .mt-legend {
    margin: 4px 0 0;
    gap: 2px 14px;
    font-size: 13px;
  }


  .mt-detail {
    margin-top: 10px;
    padding: 8px 10px;
    font-size: 13px;
    max-height: 84px;
    overflow-y: auto;
  }

  .mt-blocks {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 600px) {
  .mt-main {
    padding: 20px 0 48px;
  }

  .mt-lead {
    font-size: 16px;
  }

  .mt-steps-card,
  .mt-block {
    padding: 18px;
  }

  .mt-q {
    font-size: 20px;
  }

  .mt-nav .btn {
    flex: 1;
  }
}

/* ==========================================================================
   Çap (A4): yalnız üç qrup və kartlar. Naviqasiya, sahə, suallar və düymələr gizlidir.
   ========================================================================== */

.mt-print-foot {
  display: none;
}

@page {
  size: A4;
  margin: 14mm 14mm 18mm;
}

@media print {
  html {
    font-size: 11pt;
  }

  .mt-body {
    background-color: var(--white);
  }

  .site-header,
  .mt-lead,
  .mt-layout,
  .mt-nav,
  .mt-card-cta,
  .mt-cta .btn,
  .mt-share,
  .mt-more,
  dialog {
    display: none !important;
  }

  /* Ekranda düymənin arxasında gizlənən kartlar çapda da çıxır */
  .mt-card[hidden] {
    display: block;
  }

  .mt-main {
    padding: 0 0 12mm;
  }

  .mt-head {
    margin-bottom: 8mm;
  }

  .mt-title {
    font-size: 22pt;
  }

  .mt-result {
    margin-top: 0;
  }

  .mt-blocks {
    display: block;
  }

  .mt-block {
    margin-bottom: 8mm;
    padding: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }

  .mt-block-title,
  .mt-block-desc {
    break-after: avoid;
  }

  .mt-card {
    margin-top: 3mm;
    padding: 3mm 4mm;
    border: 1px solid var(--line);
    box-shadow: none;
    transform: none;
    cursor: auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .mt-swatch {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .mt-whatif {
    break-inside: avoid;
    border: 1px solid var(--line);
    background-color: var(--white);
  }

  .mt-cta {
    margin-top: 6mm;
  }

  /* Hər çap səhifəsinin altında: səhifə ünvanı və tarix */
  .mt-print-foot {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    font-size: 9pt;
    color: var(--muted);
    text-align: center;
  }
}
