/* ============================================================
   GPR Quoting Tool — quoting-tool.css
   vendor.gprfieldservices.com/quoting-tool.html
   ============================================================ */

:root {
  --primary:      #0f85a9;
  --primary-dark: #093653;
  --primary-light:#37add1;
  --orange:       #e67e22;
  --bg:           #f5fafd;
  --surface:      #ffffff;
  --border:       #d6eaf2;
  --text:         #1a2e3b;
  --muted:        #6b8fa3;
  --success:      #2f9e44;
  --success-bg:   #d3f9d8;
  --danger:       #e53e3e;
  --radius:       10px;
  --shadow:       0 1px 3px rgba(9,54,83,.10), 0 4px 16px rgba(9,54,83,.07);
  --shadow-lg:    0 8px 32px rgba(9,54,83,.14);
  --header-h:     60px;
  --progress-h:   4px;
  --transition:   all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ── Header ── */
#qt-header {
  position: fixed;
  top: var(--progress-h);
  left: 0; right: 0;
  height: var(--header-h);
  background: linear-gradient(to right, var(--primary-dark), var(--primary));
  z-index: 999;
  box-shadow: 0 2px 8px rgba(9,54,83,.3);
}
.qt-header-inner {
  max-width: 800px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
}
.qt-back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  flex-shrink: 0;
  transition: var(--transition);
}
.qt-back-btn:hover { background: rgba(255,255,255,.12); color: white; }
.qt-header-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}
.qt-header-icon {
  font-size: 1.3rem;
  color: rgba(255,255,255,.75);
}
.qt-header-name {
  font-size: .95rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
}
.qt-header-sub {
  font-size: .7rem;
  color: rgba(255,255,255,.55);
  font-weight: 400;
}
.qt-header-user {
  font-size: .8rem;
  color: rgba(255,255,255,.65);
  white-space: nowrap;
}

/* ── Progress Bar ── */
#qt-progress-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--progress-h);
  background: rgba(255,255,255,.3);
  z-index: 1000;
}
#qt-progress-fill {
  height: 100%;
  background: var(--primary-light);
  width: 33%;
  transition: width .5s ease;
}

/* ── Screens ── */
.qt-screen {
  display: none;
  padding-top: calc(var(--progress-h) + var(--header-h));
  min-height: 100vh;
  animation: qt-fade-in .25s ease;
}
.qt-screen.active { display: block; }
.qt-map-screen { display: none; padding-top: 0; min-height: 0; }
.qt-map-screen.active { display: flex; flex-direction: column; position: fixed; inset: 0; top: calc(var(--progress-h) + var(--header-h)); bottom: 0; }

@keyframes qt-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.qt-content {
  max-width: 680px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.qt-eyebrow {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 8px;
}
h1 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
  line-height: 1.2;
}
.qt-desc {
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 32px;
}

/* ── Form ── */
.qt-form-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.qt-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.qt-form-group.full    { flex: 1 1 100%; }
.qt-form-group.qt-flex-3 { flex: 3 1 160px; }
.qt-form-group.qt-flex-1 { flex: 1 1 70px; min-width: 70px; }

.qt-form-group label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: .01em;
}
.qt-req { color: var(--primary); }

.qt-form-group input,
.qt-form-group select {
  width: 100%;
  padding: 10px 13px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .95rem;
  color: var(--text);
  background: white;
  transition: var(--transition);
  appearance: none;
  outline: none;
}
.qt-form-group input:focus,
.qt-form-group select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,133,169,.12);
}
.qt-form-group input.error { border-color: var(--danger); }

.qt-form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b8fa3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
}

.qt-form-error {
  padding: 10px 14px;
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: .85rem;
  color: var(--danger);
  margin-bottom: 4px;
}

/* ── Buttons ── */
.qt-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(15,133,169,.3);
  white-space: nowrap;
}
.qt-btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 4px 14px rgba(15,133,169,.35);
  transform: translateY(-1px);
}
.qt-btn-primary:active { transform: translateY(0); }
.qt-btn-primary .material-icons-round { font-size: 1.05rem; }

.qt-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.qt-btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: rgba(15,133,169,.05); }
.qt-btn-ghost .material-icons-round { font-size: 1.05rem; }

.qt-btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 8px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.qt-btn-ghost-dark:hover { background: rgba(255,255,255,.16); color: white; }
.qt-btn-ghost-dark .material-icons-round { font-size: .95rem; }

.qt-btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.qt-btn-outline:hover { background: rgba(15,133,169,.07); }

#qt-open-map-btn { width: 100%; justify-content: center; padding: 13px; font-size: 1rem; }

/* ── Map ── */
#qt-map {
  flex: 1;
  width: 100%;
  cursor: crosshair;
}

.qt-map-ui-overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  pointer-events: none;
}

.qt-map-header-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: rgba(9,54,83,.96);
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.qt-map-eyebrow {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 3px;
}
.qt-map-cemetery {
  font-size: .95rem;
  font-weight: 700;
  color: white;
}
.qt-map-area-badge { text-align: right; flex-shrink: 0; }
.qt-area-acres { font-size: 1.2rem; font-weight: 800; color: var(--orange); line-height: 1.1; }
.qt-area-sqft  { font-size: .72rem; color: rgba(255,255,255,.5); font-weight: 500; }

.qt-point-counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(9,54,83,.85);
  backdrop-filter: blur(8px);
  color: rgba(255,255,255,.8);
  font-size: .78rem;
  font-weight: 600;
  padding: 5px 12px;
  margin: 7px 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,.08);
}
.qt-point-counter .material-icons-round { font-size: .95rem; color: var(--primary-light); }

.qt-map-footer {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(9,54,83,.96);
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-wrap: wrap;
}
.qt-map-footer-center {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .82rem;
  color: rgba(255,255,255,.8);
  font-weight: 500;
}
.qt-hint-icon { font-size: 1rem; color: var(--primary-light); }
.qt-map-footer-actions { display: flex; gap: 8px; }

/* Confirm sheet */
.qt-confirm-sheet {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 20;
  transform: translateY(100%);
  transition: transform .35s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.qt-confirm-sheet.visible { transform: translateY(0); pointer-events: auto; }
.qt-confirm-inner {
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,.12);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 -8px 32px rgba(0,0,0,.3);
}
.qt-confirm-area-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.qt-confirm-numbers { flex: 1; }
.qt-confirm-acres { font-size: 1.4rem; font-weight: 800; color: var(--orange); line-height: 1.1; }
.qt-confirm-sqft  { font-size: .78rem; color: rgba(255,255,255,.5); }
.qt-confirm-question { font-size: .88rem; font-weight: 600; color: white; flex: 0 0 100%; }
.qt-confirm-buttons { display: flex; gap: 9px; flex-wrap: wrap; }
.qt-confirm-btn { flex: 1; justify-content: center; }

/* Point toast */
.qt-point-toast {
  position: fixed;
  top: calc(var(--progress-h) + var(--header-h) + 72px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--primary-dark);
  color: white;
  padding: 9px 18px;
  border-radius: 30px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .85rem;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
  transition: opacity .2s ease, transform .2s ease;
  white-space: nowrap;
  border: 1px solid rgba(255,255,255,.1);
}
.qt-point-toast.visible { opacity: 1; transform: translateX(-50%) translateY(0); }
.qt-point-toast .material-icons-round { font-size: 1rem; color: var(--success); }

/* Map markers — orange for satellite visibility */
.qt-map-marker {
  width: 28px;
  height: 28px;
  background: var(--orange);
  border: 2px solid white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .68rem;
  font-weight: 800;
  color: white;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  transition: transform .15s ease;
  font-family: 'Inter', sans-serif;
}
.qt-map-marker:hover { transform: scale(1.15); }
.qt-map-marker.first-point {
  background: white;
  color: var(--orange);
  border-color: var(--orange);
}
.qt-map-marker.first-point.pulsing { animation: qt-pulse 1.2s ease infinite; }
@keyframes qt-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(230,126,34,.6), 0 2px 8px rgba(0,0,0,.3); }
  70%  { box-shadow: 0 0 0 10px rgba(230,126,34,0), 0 2px 8px rgba(0,0,0,.3); }
  100% { box-shadow: 0 0 0 0 rgba(230,126,34,0), 0 2px 8px rgba(0,0,0,.3); }
}
.qt-map-marker.draggable { cursor: grab; box-shadow: 0 0 0 3px rgba(15,133,169,.5), 0 2px 8px rgba(0,0,0,.3); }
.qt-map-marker.draggable:active { cursor: grabbing; }
.map-locate-mode { cursor: crosshair !important; }

/* Cemetery pin — orange for satellite visibility */
.qt-cemetery-pin { width: 0; height: 0; position: relative; }
.qt-cemetery-pin::before {
  content: '';
  position: absolute;
  top: -38px; left: -15px;
  width: 30px; height: 30px;
  background: var(--orange);
  border: 3px solid white;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 3px 10px rgba(0,0,0,.4);
  animation: qt-pin-drop .35s cubic-bezier(.34,1.56,.64,1);
}
.qt-cemetery-pin::after {
  content: '';
  position: absolute;
  top: -11px; left: -5px;
  width: 10px; height: 10px;
  background: white;
  border-radius: 50%;
  transform: rotate(-45deg);
  margin-left: 7px; margin-top: 7px;
}
@keyframes qt-pin-drop {
  from { transform: rotate(-45deg) scale(0) translateY(-20px); opacity: 0; }
  to   { transform: rotate(-45deg) scale(1) translateY(0); opacity: 1; }
}

/* ── Tour Modal ── */
.qt-tour-overlay {
  position: fixed;
  top: calc(var(--progress-h) + var(--header-h));
  bottom: 0;
  left: 0; right: 0;
  z-index: 50;
  background: rgba(9,54,83,.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.qt-tour-overlay.hidden { display: none; }

.qt-tour-modal {
  background: white;
  border-radius: 18px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.qt-tour-screen {
  display: none;
  padding: 24px 26px 22px;
  animation: qt-fade-in .2s ease;
}
.qt-tour-screen.active { display: block; }

.qt-tour-skip-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.qt-skip-btn {
  background: none;
  border: none;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: var(--transition);
}
.qt-skip-btn:hover { color: var(--primary); background: rgba(15,133,169,.07); }

.qt-tour-icon-wrap {
  width: 56px;
  height: 56px;
  background: rgba(15,133,169,.1);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.qt-tour-icon-wrap .material-icons-round {
  font-size: 1.8rem;
  color: var(--primary);
}
.qt-tour-modal h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}
.qt-tour-modal p {
  font-size: .875rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 6px;
}
.qt-tour-modal p strong { color: var(--text); }

.qt-tour-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #f0f4f7;
}
.qt-tour-dots { display: flex; gap: 5px; align-items: center; }
.qt-tour-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #d6eaf2;
  transition: var(--transition);
}
.qt-tour-dot.active {
  background: var(--primary);
  width: 20px;
  border-radius: 4px;
}

/* Locate tips */
.qt-locate-tips { display: flex; flex-direction: column; gap: 8px; margin: 14px 0; }
.qt-locate-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .82rem;
  color: var(--text);
}
.qt-locate-tip .material-icons-round { font-size: 1.1rem; color: var(--primary); flex-shrink: 0; }
.qt-locate-coords {
  font-size: .78rem;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  margin-top: 8px;
  font-family: monospace;
}

/* ── Pricing Screen ── */
.qt-saved-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--success-bg);
  border: 1px solid #b2f2bb;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 20px;
}
.qt-saved-banner .material-icons-round { color: var(--success); font-size: 1.6rem; flex-shrink: 0; }
.qt-saved-text { flex: 1; }
.qt-saved-text strong { display: block; font-size: .9rem; font-weight: 700; color: var(--text); }
.qt-saved-text span { font-size: .78rem; color: var(--muted); }

.qt-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  cursor: not-allowed;
  opacity: .75;
  white-space: nowrap;
  position: relative;
}
.qt-email-btn .material-icons-round { font-size: .95rem; }
.qt-coming-soon {
  position: absolute;
  top: -8px;
  right: -4px;
  background: var(--primary);
  color: white;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 2px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.qt-area-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--primary-dark);
  color: white;
  padding: 12px 16px;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: .875rem;
  font-weight: 500;
}
.qt-area-summary .material-icons-round { color: var(--orange); font-size: 1.2rem; }
.qt-area-summary strong { color: var(--orange); }

.qt-service-list { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.qt-service-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 16px;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(9,54,83,.06);
}
/* GPR is always required — highlight it */
.qt-service-row:first-child {
  border-color: var(--primary);
  background: rgba(15,133,169,.05);
}
/* Add-on rows (not GPR) — slightly muted */
.qt-service-row:not(:first-child) .qt-service-name { color: var(--muted); }
.qt-service-row:not(:first-child) .qt-service-desc  { opacity: .75; }
.qt-service-row.selected { border-color: var(--primary); background: rgba(15,133,169,.04); }
.qt-service-row.selected .qt-service-name { color: var(--text); }

.qt-service-check {
  width: 32px; height: 32px;
  border-radius: 7px;
  border: 2px solid #c8dde8;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: var(--transition);
  background: white;
}
.qt-service-check:hover { border-color: var(--primary); }
.qt-service-check.checked { background: var(--primary); border-color: var(--primary); }
.qt-service-check .material-icons-round { font-size: 1rem; color: #c8dde8; }
.qt-service-check.checked .material-icons-round { color: white; }
.qt-service-check .icon-check { display: none; }
.qt-service-check.checked .icon-add { display: none; }
.qt-service-check.checked .icon-check { display: block; }

.qt-service-info { flex: 1; }
.qt-service-name {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 7px;
}
.qt-required-badge {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: var(--primary);
  color: white;
  padding: 2px 6px;
  border-radius: 20px;
}
.qt-service-desc { font-size: .78rem; color: var(--muted); line-height: 1.4; }

.qt-total-card {
  background: var(--primary-dark);
  color: white;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 24px;
}
.qt-total-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .95rem;
  font-weight: 600;
  margin-bottom: 10px;
}
.qt-total-amount { font-size: 1.5rem; font-weight: 800; color: var(--orange); }
.qt-total-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: .73rem;
  color: rgba(255,255,255,.45);
  line-height: 1.5;
}
.qt-total-note .material-icons-round { font-size: .85rem; margin-top: 1px; flex-shrink: 0; }

.qt-pricing-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ── Mapbox overrides ── */
.mapboxgl-ctrl-attrib { font-size: 10px !important; }
.mapboxgl-ctrl-logo { display: none !important; }

/* ── Responsive ── */
@media (max-width: 580px) {
  .qt-content { padding: 28px 16px 60px; }
  h1 { font-size: 1.35rem; }
  .qt-confirm-buttons { flex-direction: column; }
  .qt-pricing-actions { justify-content: stretch; }
  .qt-pricing-actions .qt-btn-outline,
  .qt-pricing-actions .qt-btn-primary { flex: 1; justify-content: center; }
}
