/* =========================================================
   Ubuntu Scaffolding — Request a Quote modal
   Loads after styles.css and reuses its tokens.
   ========================================================= */

.quote-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(25, 30, 27, .72);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
  overflow-y: auto;
}
.quote-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
body.quote-locked { overflow: hidden; }

.quote-modal {
  position: relative;
  width: 100%;
  max-width: 620px;
  background: #ffffff;
  border-radius: var(--radius, 6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  overflow: hidden;
  transform: translateY(14px);
  transition: transform .22s ease;
  margin: auto;
}
.quote-overlay.is-open .quote-modal { transform: translateY(0); }

/* Header */
.quote-head {
  background: var(--dark, #29312c);
  padding: 26px 32px 24px;
  border-bottom: 6px solid var(--red, #E31E24);
}
.quote-head .eyebrow { color: var(--green, #8CC63F); }
.quote-head h2 {
  margin-top: 8px;
  font-size: 24px;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}
.quote-head p {
  margin-top: 8px;
  font-size: 13.5px;
  color: #b9c0b7;
  line-height: 1.6;
}

.quote-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: rgba(255, 255, 255, .12);
  color: #ffffff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: background-color .2s ease;
}
.quote-close:hover { background: rgba(255, 255, 255, .24); }

/* Body */
.quote-body { padding: 28px 32px 32px; }

.quote-field { margin-bottom: 18px; }
.quote-field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink, #333);
}
.quote-field .req { color: var(--red, #E31E24); }

.quote-field input,
.quote-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  background: #fbfbfa;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink, #333);
  transition: border-color .2s ease, background-color .2s ease;
}
.quote-field textarea {
  min-height: 128px;
  resize: vertical;
  line-height: 1.6;
}
.quote-field input:focus,
.quote-field textarea:focus {
  outline: none;
  border-color: var(--green, #8CC63F);
  background: #ffffff;
}
.quote-field input::placeholder,
.quote-field textarea::placeholder { color: #a9a9a9; }

.quote-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.quote-error {
  display: none;
  margin-top: 6px;
  font-size: 12.5px;
  color: var(--red, #E31E24);
}
.quote-field.has-error input,
.quote-field.has-error textarea { border-color: var(--red, #E31E24); }
.quote-field.has-error .quote-error { display: block; }

/* Honeypot */
.quote-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* POPIA consent */
.quote-consent {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-top: 4px;
  padding: 15px 16px;
  background: var(--grey-bg, #f6f7f5);
  border-left: 4px solid var(--green, #8CC63F);
  border-radius: 4px;
}
.quote-consent input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--green, #8CC63F);
  cursor: pointer;
}
.quote-consent label {
  font-size: 12.5px;
  font-weight: 400;
  color: var(--muted, #7a7a7a);
  line-height: 1.65;
  cursor: pointer;
  margin: 0;
}
.quote-consent.has-error { border-left-color: var(--red, #E31E24); }
.quote-consent + .quote-error { display: none; }
.quote-consent.has-error + .quote-error { display: block; }

/* Actions */
.quote-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}
.quote-actions .btn-primary { padding: 14px 28px; }
.quote-actions .btn[disabled] {
  opacity: .6;
  pointer-events: none;
}
.quote-note {
  font-size: 12px;
  color: var(--muted, #7a7a7a);
  line-height: 1.5;
}

.quote-alert {
  display: none;
  margin-bottom: 18px;
  padding: 13px 16px;
  border-radius: 4px;
  background: #fdecec;
  border-left: 4px solid var(--red, #E31E24);
  font-size: 13px;
  color: #8f2126;
  line-height: 1.6;
}
.quote-alert.is-visible { display: block; }

/* Success panel */
.quote-success {
  display: none;
  padding: 52px 32px 46px;
  text-align: center;
}
.quote-modal.is-sent .quote-body { display: none; }
.quote-modal.is-sent .quote-success { display: block; }

.quote-success-mark {
  width: 66px;
  height: 66px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--green, #8CC63F);
  color: #ffffff;
  font-size: 28px;
}
.quote-success h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink, #333);
}
.quote-success p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted, #7a7a7a);
  line-height: 1.75;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  text-wrap: pretty;
}
.quote-success .btn { margin-top: 26px; }

/* Responsive */
@media (max-width: 620px) {
  .quote-overlay { padding: 0; align-items: stretch; }
  .quote-modal {
    max-width: 100%;
    border-radius: 0;
    min-height: 100%;
  }
  .quote-head { padding: 22px 20px 20px; }
  .quote-head h2 { font-size: 20px; }
  .quote-body { padding: 22px 20px 28px; }
  .quote-row { grid-template-columns: 1fr; gap: 0; }
  .quote-actions { flex-direction: column; align-items: stretch; text-align: center; }
  .quote-actions .btn { width: 100%; justify-content: center; }
}