/* EA Estimator Core - MVP */
/* Goal: stay inside the page, never overflow, mobile friendly. */

.ea-core-shell { width: 100%; }
.ea-core-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
  box-sizing: border-box;
}

.ea-core-topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 14px;
}

.ea-core-brand { display:flex; align-items:center; gap:12px; min-width:0; }
.ea-core-logo { width: 44px; height: 44px; object-fit: contain; border-radius: 10px; }
.ea-core-brandtext { min-width:0; }
.ea-core-title { font-size: 18px; font-weight: 700; line-height:1.2; }
.ea-core-sub { opacity:.75; font-size: 13px; }

.ea-core-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

/* 3-column on wide screens, but clamp so it never spills */
@media (min-width: 980px){
  .ea-core-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ea-core-card {
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 14px;
  padding: 14px;
  box-sizing: border-box;
  background: #fff;
  overflow: hidden; /* prevents right-side spill */
  min-width: 0; /* critical for grid overflow */
}

.ea-core-card h3 { margin: 0 0 10px; font-size: 15px; }

.ea-core-row { display:flex; flex-direction:column; gap:6px; margin-bottom: 10px; min-width:0; }
.ea-core-row label { font-size: 12px; opacity:.8; }
.ea-core-row input,
.ea-core-row textarea,
.ea-core-row select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 10px 10px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.18);
  outline: none;
}

.ea-core-row textarea { resize: vertical; }

.ea-core-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top: 10px; }

.ea-btn {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.2);
  background: #111;
  color: #fff;
  cursor: pointer;
}
.ea-btn:disabled { opacity:.5; cursor:not-allowed; }
.ea-btn-secondary { background: #f3f4f6; color:#111; }

.ea-core-result { margin-top: 12px; word-break: break-word; }
.ea-core-total { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.ea-core-pre {
  max-width: 100%;
  overflow: auto;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0,0,0,.04);
  font-size: 12px;
}

.ea-core-hint { font-size: 12px; opacity: .75; margin-top: 6px; }
.ea-core-box {
  border:1px dashed rgba(0,0,0,.25);
  border-radius: 14px;
  padding: 14px;
  margin: 10px 0;
  background: rgba(0,0,0,.02);
}

.ea-proposal-shell { max-width: 900px; margin: 0 auto; padding: 18px; box-sizing:border-box; }
.ea-proposal { background: #fff; border:1px solid rgba(0,0,0,.12); border-radius: 14px; padding: 16px; }
.ea-proposal-header { display:flex; gap:14px; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; }
.ea-proposal-logo { width: 70px; height:70px; object-fit:contain; border-radius: 12px; }
.ea-proposal-company-name { font-weight: 800; font-size: 18px; }
.ea-proposal-company-meta { opacity:.75; font-size: 12px; }
.ea-proposal-doc { text-align:right; font-size: 12px; opacity:.85; }
.ea-proposal-section { margin-top: 14px; }
.ea-proposal-section h3 { margin: 0 0 6px; font-size: 13px; }
.ea-proposal-total { font-size: 18px; font-weight: 900; }
.ea-proposal-breakdown { max-width:100%; overflow:auto; background: rgba(0,0,0,.04); padding: 10px; border-radius: 10px; font-size: 12px; }
.ea-sign-row { display:flex; gap:12px; flex-wrap:wrap; margin-top: 10px; }
.ea-sign-line { flex: 1 1 240px; border-bottom: 1px solid rgba(0,0,0,.35); padding-bottom: 20px; }
.ea-proposal-print { margin-top: 16px; }
@media print {
  .ea-proposal-print { display:none !important; }
  .ea-proposal-shell { padding: 0; }
  .ea-proposal { border:none; }
}
