﻿/* =============================================================
   ENYED — Quote Wizard Modal Styles (11. Modül)
   ============================================================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.quote-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -46%);
  width: min(560px, 92vw);
  max-height: min(680px, 86vh);
  max-height: min(680px, 86dvh);
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 32px 30px 24px;
  z-index: 501;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
}
.quote-modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.quote-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: border-color .2s, color .2s, background .2s;
}
.quote-close:hover {
  border-color: var(--gold);
  background: rgba(198, 144, 35, .10);
}

.quote-progress {
  display: flex;
  gap: 6px;
  margin-bottom: 24px;
  flex-shrink: 0;
}
.quote-progress i {
  flex: 1;
  height: 3px;
  border-radius: 3px;
  background: var(--line);
  transition: background .3s;
}
.quote-progress i.done {
  background: var(--gold);
}

.quote-step {
  display: none;
}
.quote-step.active {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
  animation: fadeIn .3s ease;
}
@keyframes fadeIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.quote-step .eyebrow {
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--dim);
  font-weight: 500;
}
.quote-step h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 21px;
  margin-bottom: 18px;
  letter-spacing: -.5px;
  line-height: 1.3;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 4px;
}
.option {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 13.5px;
  color: var(--fg);
  background: var(--card-dark);
  cursor: pointer;
  text-align: left;
  transition: background .2s, border-color .2s;
  min-height: 48px;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}
.option:hover {
  border-color: var(--gold);
}
.option.selected {
  background: var(--gold);
  color: #0B1220;
  border-color: var(--gold);
  font-weight: 600;
}

.field {
  margin-bottom: 16px;
}
.field label {
  display: block;
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 8px;
  font-weight: 500;
}
.field input,
.field select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--card-dark);
  color: var(--fg);
  font: inherit;
  font-size: 14px;
  cursor: auto;
  box-sizing: border-box;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--gold);
}
.kvkk {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12px;
  color: var(--dim);
  line-height: 1.5;
  margin-top: 6px;
}
.kvkk input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
}

/* Navigasyon Butonları — Sticky Bottom Bar */
.quote-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  width: 100%;
  box-sizing: border-box;
}
.quote-nav button {
  cursor: pointer;
  flex: 1 1 0%;
  min-width: 0;
  width: auto;
  min-height: 46px;
  padding: 0 20px;
  font-size: 13px;
  letter-spacing: .5px;
  font-weight: 600;
  border-radius: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.quote-nav button:active {
  transform: scale(0.97);
}
.quote-nav button.hidden,
.quote-nav button[style*="display: none"] {
  display: none !important;
}

#quoteBack {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--fg);
}
#quoteBack:hover {
  border-color: var(--gold);
}
#quoteNext {
  background: var(--gold);
  color: #0B1220;
  border: none;
  margin-left: auto;
}

.quote-success {
  text-align: center;
  padding: 24px 0;
  margin: auto 0;
}
.quote-success .mark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 26px;
}
.quote-success h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  margin-bottom: 10px;
}
.quote-success p {
  color: var(--dim);
  font-size: 14px;
  line-height: 1.6;
}

/* =============================================================
   RESPONSIVE BREAKPOINTS: Mobile (< 560px)
   ============================================================= */
@media (max-width: 560px) {
  .quote-modal {
    width: min(440px, 94vw);
    padding: 20px 16px 16px;
    border-radius: 18px;
    max-height: 85vh;
    max-height: 85dvh;
  }
  .quote-close {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 20px;
  }
  .quote-progress {
    margin-bottom: 16px;
    padding-right: 40px; /* Close button room */
  }
  .quote-step h3 {
    font-size: 18px;
    margin-bottom: 14px;
    line-height: 1.3;
  }
  .quote-step .eyebrow {
    font-size: 10px;
    margin-bottom: 4px;
  }
  .option-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .option {
    padding: 12px 14px;
    font-size: 13.5px;
    min-height: 46px;
  }
  .field {
    margin-bottom: 12px;
  }
  .field input,
  .field select {
    font-size: 16px; /* Prevents iOS Safari auto-zoom */
    padding: 12px 14px;
    min-height: 46px;
  }
  .quote-nav {
    margin-top: 14px;
    padding-top: 12px;
    gap: 10px;
    width: 100%;
  }
  .quote-nav button {
    flex: 1 1 0% !important;
    min-width: 0 !important;
    width: 100% !important;
    min-height: 48px;
    padding: 0 12px;
    font-size: 13px;
    letter-spacing: .3px;
  }
  #quoteBack.hidden,
  #quoteBack[style*="display: none"] {
    display: none !important;
  }
}

/* Extra Small Mobile (< 360px) */
@media (max-width: 360px) {
  .quote-modal {
    padding: 16px 12px 14px;
  }
  .quote-nav button {
    padding: 0 8px;
    font-size: 12px;
  }
}

@media (hover: none), (pointer: coarse) {
  .quote-close,
  .option,
  .quote-nav button,
  .kvkk input {
    cursor: pointer !important;
  }
}

/* =============================================================
   İletişim adımı doğrulama geri bildirimi

   Alanlar bir <form> içinde olmadığı için "required" ve type="email"
   hiç devreye girmiyordu; eksik alanda yalnızca gezinme çubuğu
   titriyor, kullanıcı hangi alanın sorunlu olduğunu göremiyordu.
   ============================================================= */
.quote-modal .field-error,
.quote-modal p.field-error {
  margin: .4rem 0 0;
  color: #FF9B9B;
  font-size: .82rem;
  line-height: 1.45;
}

.quote-modal input.is-invalid,
.quote-modal input.is-invalid:focus {
  border-color: #FF9B9B;
  box-shadow: 0 0 0 3px rgba(255, 155, 155, .18);
}

/* Onay kutusu kenarlık taşımadığı için hata ayrıca işaretleniyor. */
.quote-modal input[type="checkbox"].is-invalid {
  outline: 2px solid #FF9B9B;
  outline-offset: 2px;
}

.quote-modal .quote-form-error {
  margin-top: 1rem;
  padding: .8rem 1rem;
  border-radius: 10px;
  background: rgba(255, 155, 155, .12);
  border: 1px solid rgba(255, 155, 155, .35);
  color: #FFC9C9;
  font-size: .88rem;
  line-height: 1.5;
}


/* Teklif formunun gönder düğmesi: ölçüler burada, renk .btn-primary'de. */
.quote-submit {
  width: 100%;
  padding: 1.1rem;
  font-size: 1.15rem;
  border-radius: 12px;
  font-weight: 700;
}
