/* =========================================================
   ZT İş Güvenliği — Teklif modalı
   1. faz tasarımından ayrıldı: modal ürün sayfasına özel değil,
   ana sayfa ve teklif sayfası dışındaki her sayfada bulunur.
   ========================================================= */

/* Modal başlığındaki "seçilen konu" rozeti */
.chosen {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 4px;
}
/* display:inline-flex, [hidden] özniteliğini ezdiği için açıkça geri alınıyor */
.chosen__item[hidden] { display: none; }
.chosen__item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 100px;
  font-size: 12.5px; line-height: 1.2;
  /* uzun ürün adı dar ekranda formu genişletmesin */
  max-width: 100%; min-width: 0;
}
.chosen__k {
  font-family: var(--f-head); font-size: 10.5px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: #ff9a5c;
  flex: none;
}
.chosen__v { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* =========================================================
   9. TEKLİF MODALI
   ========================================================= */
.modal {
  position: fixed; inset: 0; z-index: 1070;
  display: grid; place-items: end center;
  opacity: 0; transition: opacity .25s var(--ease);
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }

.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(6,26,48,.72);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}

.modal__panel {
  position: relative;
  width: 100%; max-height: 92dvh;
  display: flex; flex-direction: column;
  background: var(--navy-800);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: 0 -20px 60px -20px rgba(0,0,0,.8);
  transform: translateY(24px);
  transition: transform .3s var(--ease);
}
.modal.is-open .modal__panel { transform: none; }

.modal__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  flex: none;
}
.modal__eyebrow {
  font-family: var(--f-head); font-size: 10.5px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: #ff9a5c;
  margin-bottom: 5px;
}
.modal__title {
  font-size: clamp(17px, 4vw, 21px); line-height: 1.25;
  color: #fff; letter-spacing: -.018em;
}
.modal__close {
  flex: none; width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius);
  background: transparent; color: #fff; cursor: pointer;
  transition: background-color var(--dur) var(--ease);
}
.modal__close:hover { background: rgba(255,255,255,.1); }
.modal__close svg { width: 19px; height: 19px; stroke: currentColor; fill: none; }

.modal__body {
  padding: 18px 18px 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Gönder butonu her zaman erişilebilir kalsın */
.modal__foot {
  position: sticky; bottom: 0;
  display: grid; gap: 12px;
  margin-inline: -18px;
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  background: var(--navy-800);
  box-shadow: 0 -14px 20px -12px rgba(10,37,64,.95);
}
.modal__foot .quote__submit { width: 100%; }
.modal__foot .consent { min-height: 0; padding-block: 0; }
.modal__body .chosen { margin-bottom: 16px; }
.modal__body .quote__form { gap: 14px; }
.modal__body .quote__row { display: grid; gap: 12px; }
.modal__body .quote__submit { width: 100%; }
.modal__body .quote__status:empty { margin-top: 0; }

.modal__alt {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
  margin-top: 16px; padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
  font-size: 13px; color: var(--on-dark-2);
}
.modal__alt a {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-head); font-weight: 600; color: #fff;
  min-height: 32px;
  transition: color var(--dur) var(--ease);
}
.modal__alt a:hover { color: #ff9a5c; }
.modal__alt .ico { width: 16px; height: 16px; color: var(--orange); }
.modal__alt .ico--wa { fill: #25d366; stroke: none; color: #25d366; }
.modal__alt span { color: rgba(255,255,255,.25); }

@media (min-width: 768px) {
  .modal { place-items: center; padding: 24px; }
  .modal__panel {
    max-width: 720px; max-height: 88dvh;
    border-radius: var(--radius-lg);
    transform: translateY(0) scale(.97);
  }
  .modal.is-open .modal__panel { transform: none; }
  .modal__head { padding: 24px 28px 18px; }
  .modal__body { padding: 22px 28px 0; }
  .modal__foot {
    margin-inline: -28px; padding: 16px 28px 24px;
    grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center;
  }
  .modal__body .quote__row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .modal__body .field--wide { grid-column: 1 / -1; }
  .modal__foot .quote__submit { width: auto; min-width: 260px; }
}

/* Modal açıkken arka plan kaymasın */
body.zt-modal-open { overflow: hidden; }
