/* Eco Infra — slide-up quote modal (3 steps) */
:root { --mq-z: 1200; }

#modal-quote {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: var(--mq-z);
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
  padding: 24px;
}
#modal-quote.open { display: flex; }

.mq-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 38, 77, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  animation: mq-fade-in .25s ease forwards;
}
@keyframes mq-fade-in { to { opacity: 1; } }

.mq-panel {
  position: relative;
  z-index: calc(var(--mq-z) + 1);
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  background: var(--white);
  color: var(--charcoal);
  box-shadow: 0 32px 80px rgba(5, 38, 77, .35), 0 0 0 1px rgba(61, 187, 99, .12);
  transform: translateY(24px) scale(.98);
  opacity: 0;
  animation: mq-panel-in .35s cubic-bezier(.2, .8, .2, 1) .05s forwards;
}
@keyframes mq-panel-in {
  to { transform: none; opacity: 1; }
}

.mq-close {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .12);
  border: 0;
  border-radius: 999px;
  font-size: 22px;
  line-height: 1;
  color: rgba(255, 255, 255, .85);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background .18s ease, color .18s ease;
}
.mq-close:hover {
  background: var(--green);
  color: var(--white);
}

.mq-header {
  background: var(--navy);
  color: var(--white);
  padding: 22px 52px 20px 22px;
  border-bottom: 3px solid var(--green);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 14px;
}
.mq-logo {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: block;
}
.mq-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(61, 187, 99, .2), transparent 55%);
  pointer-events: none;
}
.mq-header-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}
.mq-header h3 {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  color: var(--white);
  text-transform: none;
  line-height: 1.3;
}
.mq-sub {
  margin: 6px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
  line-height: 1.45;
}

.mq-body {
  padding: 24px 24px 20px;
  overflow-y: auto;
  flex: 1;
}
#modal-quote .field {
  margin-bottom: 12px;
}
#modal-quote .field:last-child {
  margin-bottom: 0;
}
#modal-quote .mq-form-status {
  margin-bottom: 12px;
}
#modal-quote .mq-form-status:not(.show) {
  display: none;
}
#modal-quote .qf-actions [hidden] {
  display: none !important;
}
#modal-quote .qf-actions[data-step="1"] .qf-back,
#modal-quote .qf-actions[data-step="1"] .qf-submit,
#modal-quote .qf-actions[data-step="2"] .qf-submit,
#modal-quote .qf-actions[data-step="3"] .qf-next {
  display: none !important;
}

.mq-thanks {
  padding: 40px 28px 32px;
  text-align: center;
}
.mq-thanks[hidden] { display: none !important; }
.mq-thanks-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}
.mq-thanks h4 {
  margin: 0 0 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 18px;
  color: var(--navy);
  text-transform: none;
}
.mq-thanks p {
  margin: 0 0 20px;
  font-size: 14px;
  color: var(--charcoal-soft);
  line-height: 1.55;
}

@media (max-width: 600px) {
  #modal-quote {
    padding: 0;
    align-items: flex-end;
  }
  .mq-panel {
    width: 100%;
    max-height: 92vh;
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    animation: mq-sheet-in .4s cubic-bezier(.2, .8, .2, 1) forwards;
  }
  @keyframes mq-sheet-in {
    to { transform: none; opacity: 1; }
  }
  .mq-body { padding: 20px 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .mq-backdrop, .mq-panel, .qf-step-panel { animation: none !important; opacity: 1; transform: none; }
}
