/* =====================================================================
   Make a Site Plan — Tools Suite CSS
   Brand: Orange #E87002  |  Teal #0D4F4A  |  Slate #1E293B
   ===================================================================== */

/* ── RESET & CONTAINER ─────────────────────────────────────────────── */
.msp-tool *, .msp-tool *::before, .msp-tool *::after {
  box-sizing: border-box;
}
.msp-tool {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 860px;
  margin: 0 auto 48px;
  color: #1E293B;
  line-height: 1.6;
}
.msp-tool h2 { font-size: 1.75rem; font-weight: 700; color: #0D4F4A; margin: 0 0 8px; }
.msp-tool h3 { font-size: 1.25rem; font-weight: 600; color: #1E293B; margin: 0 0 16px; }
.msp-tool h4 { font-size: 1rem;   font-weight: 600; color: #0D4F4A; margin: 24px 0 10px; }
.msp-tool p  { margin: 0 0 12px; color: #475569; }

/* ── HEADER ─────────────────────────────────────────────────────────── */
.msp-tool-header {
  background: #0D4F4A;
  color: #fff;
  padding: 28px 32px;
  border-radius: 12px 12px 0 0;
}
.msp-tool-header h2 { color: #fff; font-size: 1.6rem; }
.msp-tool-header p  { color: #A7D8D3; margin: 0; }

.msp-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.msp-badges span {
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

/* ── STEP PROGRESS BAR ─────────────────────────────────────────────── */
.msp-steps-bar {
  display: flex;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}
.msp-step {
  flex: 1;
  text-align: center;
  padding: 12px 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #94a3b8;
  cursor: default;
  transition: all 0.2s;
}
.msp-step.active {
  color: #E87002;
  border-bottom: 3px solid #E87002;
  background: #fff;
}
.msp-step.done {
  color: #15803d;
}

/* ── STEP CONTENT ───────────────────────────────────────────────────── */
.msp-step-content {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-top: none;
  padding: 32px;
}
.msp-step-content.hidden { display: none !important; }
.hidden { display: none !important; }

/* ── FORM FIELDS ─────────────────────────────────────────────────────── */
.msp-field-group {
  margin-bottom: 18px;
}
.msp-field-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}
.msp-field-group input,
.msp-field-group select,
.msp-field-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #1e293b;
  background: #fff;
  transition: border-color 0.2s;
}
.msp-field-group input:focus,
.msp-field-group select:focus,
.msp-field-group textarea:focus {
  outline: none;
  border-color: #E87002;
  box-shadow: 0 0 0 3px rgba(232,112,2,0.12);
}
.msp-hint {
  font-size: 0.82rem;
  color: #64748b;
  font-style: italic;
  margin-bottom: 16px;
}

/* ── OPTION GRID ─────────────────────────────────────────────────────── */
.msp-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.msp-option {
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.msp-option strong { font-size: 0.92rem; color: #1e293b; }
.msp-option span   { font-size: 0.78rem; color: #64748b; }
.msp-option:hover  { border-color: #E87002; background: #fff7ed; }
.msp-option.selected {
  border-color: #E87002;
  background: #fff7ed;
  box-shadow: 0 0 0 3px rgba(232,112,2,0.12);
}
.msp-option.selected strong { color: #E87002; }

/* ── BUTTONS ─────────────────────────────────────────────────────────── */
.msp-btn-primary {
  background: #E87002;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, transform 0.12s;
  text-decoration: none;
  display: inline-block;
}
.msp-btn-primary:hover {
  background: #c96102;
  transform: translateY(-1px);
}
.msp-btn-ghost {
  background: transparent;
  color: #64748b;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}
.msp-btn-ghost:hover {
  border-color: #94a3b8;
  color: #1e293b;
}
.msp-btn-whatsapp {
  background: #25D366;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.18s;
}
.msp-btn-whatsapp:hover { background: #1fba59; }

.msp-nav-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  gap: 12px;
}

/* ── LOADING ─────────────────────────────────────────────────────────── */
.msp-loading {
  text-align: center;
  padding: 40px 20px;
}
.msp-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid #e2e8f0;
  border-top-color: #E87002;
  border-radius: 50%;
  animation: msp-spin 0.7s linear infinite;
  margin: 0 auto 16px;
}
@keyframes msp-spin { to { transform: rotate(360deg); } }

/* ── SETBACK DIAGRAM ─────────────────────────────────────────────────── */
.msp-setback-diagram {
  margin: 20px 0;
  display: flex;
  justify-content: center;
}
.msp-lot {
  position: relative;
  width: 280px;
  height: 280px;
  background: #f0fdf4;
  border: 2.5px dashed #4ade80;
  border-radius: 4px;
}
.msp-setback-label {
  position: absolute;
  font-size: 0.76rem;
  font-weight: 600;
  color: #0D4F4A;
  background: #D0F0EB;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.msp-setback-label.top    { top: -14px; left: 50%; transform: translateX(-50%); }
.msp-setback-label.bottom { bottom: -14px; left: 50%; transform: translateX(-50%); }
.msp-setback-label.left   { left: -5px; top: 50%; transform: translateY(-50%) rotate(-90deg); }
.msp-setback-label.right  { right: -5px; top: 50%; transform: translateY(-50%) rotate(90deg); }

.msp-lot-inner {
  position: absolute;
  inset: 40px;
  border: 2px solid #E87002;
  background: rgba(232,112,2,0.06);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.msp-structure-box {
  font-size: 0.72rem;
  font-weight: 600;
  color: #E87002;
  text-align: center;
}

/* ── RESULTS TABLE ───────────────────────────────────────────────────── */
.msp-results-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
}
.msp-results-table th {
  background: #0D4F4A;
  color: #fff;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.85rem;
}
.msp-results-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.88rem;
}
.msp-results-table tr:nth-child(even) td { background: #f8fafc; }

.msp-results-header { margin-bottom: 20px; }
.msp-results-header h3 { color: #0D4F4A; margin-bottom: 4px; }
.msp-results-header p { color: #64748b; font-size: 0.88rem; }

/* ── INFO BOXES ──────────────────────────────────────────────────────── */
.msp-notes-box {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  margin: 16px 0;
  font-size: 0.88rem;
  color: #1e40af;
}
.msp-disclaimer-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.80rem;
  color: #64748b;
  margin: 12px 0;
}
.msp-warning-box {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-size: 0.88rem;
  color: #991b1b;
  margin: 12px 0;
}
.msp-error-box {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  color: #991b1b;
}

/* ── CTA BOX ─────────────────────────────────────────────────────────── */
.msp-cta-box {
  background: linear-gradient(135deg, #0D4F4A 0%, #1a6b64 100%);
  border-radius: 12px;
  padding: 28px 32px;
  margin-top: 28px;
  color: #fff;
}
.msp-cta-box h4 { color: #fff; font-size: 1.1rem; margin: 0 0 8px; }
.msp-cta-box p  { color: #A7D8D3; margin: 0 0 20px; }
.msp-cta-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── LEAD FORM ───────────────────────────────────────────────────────── */
.msp-lead-form {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px;
  margin-top: 24px;
}
.msp-lead-form h4 { color: #0D4F4A; margin-bottom: 6px; }
.msp-lead-form p  { color: #475569; font-size: 0.88rem; margin-bottom: 18px; }
.msp-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.msp-form-grid input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
}
.msp-form-grid input:focus { outline: none; border-color: #E87002; }
.msp-lead-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.9rem;
  resize: vertical;
  margin-bottom: 16px;
}
.msp-lead-form textarea:focus { outline: none; border-color: #E87002; }
.msp-form-footer { font-size: 0.78rem; color: #94a3b8; margin-top: 10px; text-align: center; }
.msp-form-footer a { color: #E87002; text-decoration: none; }
.msp-form-msg.success { color: #15803d; background: #f0fdf4; border: 1px solid #86efac; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.msp-form-msg.error   { color: #991b1b; background: #fef2f2; border: 1px solid #fca5a5; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }

/* ── LOT COVERAGE CALC LAYOUT ────────────────────────────────────────── */
.msp-calc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid #e2e8f0;
  border-top: none;
  background: #fff;
}
.msp-calc-left {
  padding: 28px;
  border-right: 1px solid #e2e8f0;
}
.msp-calc-right {
  padding: 28px;
  background: #f8fafc;
}
.msp-results-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 300px;
  text-align: center;
  color: #94a3b8;
}
.msp-placeholder-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }
.msp-results-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0;
}
.msp-result-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  text-align: center;
}
.msp-result-card .msp-result-val {
  font-size: 1.6rem;
  font-weight: 700;
  color: #0D4F4A;
  display: block;
}
.msp-result-card .msp-result-lbl {
  font-size: 0.78rem;
  color: #64748b;
  display: block;
  margin-top: 2px;
}
.msp-result-card.danger .msp-result-val { color: #dc2626; }
.msp-result-card.warning .msp-result-val { color: #d97706; }

/* Coverage bar */
.msp-coverage-bars { margin: 0 0 20px; }
.msp-coverage-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
}
.msp-coverage-bar-label { width: 120px; flex-shrink: 0; color: #475569; text-align: right; }
.msp-coverage-bar-track {
  flex: 1;
  height: 12px;
  background: #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
}
.msp-coverage-bar-fill {
  height: 100%;
  border-radius: 6px;
  transition: width 0.5s ease;
}
.msp-bar-existing { background: #0D4F4A; }
.msp-bar-new      { background: #E87002; }
.msp-bar-max      { background: #e2e8f0; border: 2px dashed #94a3b8; }
.msp-coverage-bar-pct { width: 40px; flex-shrink: 0; font-weight: 600; color: #1e293b; }

/* ── MOBILE ───────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .msp-step-content        { padding: 20px 16px; }
  .msp-tool-header         { padding: 20px 16px; }
  .msp-option-grid         { grid-template-columns: 1fr 1fr; }
  .msp-form-grid           { grid-template-columns: 1fr; }
  .msp-calc-grid           { grid-template-columns: 1fr; }
  .msp-calc-left           { border-right: none; border-bottom: 1px solid #e2e8f0; }
  .msp-cta-box             { padding: 20px 16px; }
  .msp-results-grid        { grid-template-columns: 1fr 1fr; }
  .msp-tool h2             { font-size: 1.35rem; }
  .msp-setback-diagram     { transform: scale(0.85); }
}
