.ehf-mp { margin: 16px 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }

/* Match AI Tool Finder look & feel */
.ehf-mp-card {
  background: #054076;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(5, 64, 118, 0.3);
  color: #fff;
  position: relative;
}
.ehf-mp-card h3 { margin:0 0 6px; font-size:28px; font-weight:700; line-height:1.3; color:#fff; }
.ehf-mp-sub { margin:0 0 14px; color:rgba(255,255,255,0.92); font-size:16px; line-height:1.5; }
.ehf-mp-label { display:block; font-weight:700; margin:10px 0 6px; color:#fff; }
.ehf-mp-input { width:100%; padding:15px; border:none; border-radius:10px; font-size:16px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.ehf-mp-input:focus { outline:none; box-shadow: 0 0 0 3px rgba(255,255,255,0.4); }
.ehf-mp-textarea { width:100%; padding:15px; border:none; border-radius:12px; font-size:16px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); resize:vertical; min-height:110px; }
.ehf-mp-textarea:focus { outline:none; box-shadow: 0 0 0 3px rgba(255,255,255,0.4); }
.ehf-mp-row { display:flex; gap:10px; flex-wrap:wrap; }
.ehf-mp-col { flex:1 1 160px; min-width:160px; }
.ehf-mp-btn { margin-top:18px; padding:15px 40px; border-radius:10px; border:0; cursor:pointer; background:#03BDC6; color:#fff; font-weight:800; font-size:16px; box-shadow: 0 6px 18px rgba(0,0,0,0.18); }
.ehf-mp-btn:disabled { opacity:0.6; cursor:not-allowed; }
.ehf-mp-btn-secondary { background: rgba(255,255,255,0.15); color:#fff; border:1px solid rgba(255,255,255,0.35); box-shadow:none; margin-left:10px; }
.ehf-mp-note { margin-top:12px; font-size:13px; color:rgba(255,255,255,0.9); }
.ehf-mp-help { margin:6px 0 8px; color:rgba(255,255,255,0.92); font-size:14px; }
.ehf-mp-disclaimer { margin-top:12px; padding:10px 12px; border-radius:12px; background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.95); font-size:13px; line-height:1.45; }
.ehf-mp-toggle { display:flex; gap:10px; margin-top:8px; }
.ehf-mp-chip { border:1px solid rgba(255,255,255,0.35); background: rgba(255,255,255,0.12); color:#fff !important; padding:10px 14px; border-radius:999px; cursor:pointer; font-weight:800; font-size:14px; line-height:1.2; }
.ehf-mp-chip:hover { background: rgba(255,255,255,0.18); }

.ehf-mp-chip.is-active {
  background:#ffffff !important;
  border-color:#ffffff !important;
  /* Guaranteed contrast across themes */
  color:#054076 !important;
  box-shadow: 0 6px 16px rgba(0,0,0,0.18);
}
.ehf-mp-field { margin-top:10px; }
.ehf-mp-loading { margin-top:14px; padding:10px 12px; border-radius:12px; background: rgba(0,0,0,0.14); color:#fff; font-weight:700; }
.ehf-mp-error { margin-top:14px; padding:12px 14px; border-radius:12px; background: rgba(255,255,255,0.12); border:1px solid rgba(255,255,255,0.35); color:#fff; }
.ehf-mp-error a { color:#fff; text-decoration:underline; font-weight:800; }
.ehf-mp-error code { background: rgba(0,0,0,0.18); padding:2px 6px; border-radius:8px; }
.ehf-mp-results { margin-top:16px; }
.ehf-mp-results-card { border:1px solid #e5e7eb; border-radius:16px; padding:18px; background:#fff; box-shadow: 0 10px 24px rgba(0,0,0,0.06); }
.ehf-mp-results-card h3 { margin:0 0 6px; font-size:22px; color:#0f172a; }
.ehf-mp-results-sub { margin:0 0 10px; color:#334155; }
.ehf-mp-results-note { margin:0 0 12px; color:#475569; }
.ehf-mp-table-wrap { overflow:auto; }
.ehf-mp-table { width:100%; border-collapse:collapse; font-size:14px; }
.ehf-mp-table th, .ehf-mp-table td { text-align:left; padding:10px 10px; border-bottom:1px solid #e5e7eb; vertical-align:top; }
.ehf-mp-table th { background:#f8fafc; color:#0f172a; font-weight:800; }
.ehf-mp-buy a { display:inline-block; margin-top:6px; font-weight:800; color:#054076; text-decoration:underline; }
.ehf-mp-results-disclaimer { margin-top:12px; color:#475569; }
.ehf-mp-prod { margin-top:8px; padding:10px; border:1px solid #e5e7eb; border-radius:12px; display:flex; gap:12px; align-items:flex-start; }
.ehf-mp-prod img { width:72px; height:auto; border-radius:10px; }
.ehf-mp-prod-title { font-weight:700; margin-bottom:4px; }
.ehf-mp-prod a { text-decoration:none; }

/* Lightweight modal styles (shared class names with Tool Finder) */
.atf-modal { position:fixed; inset:0; z-index:9999; }
.atf-modal-backdrop { position:absolute; inset:0; background: rgba(0,0,0,0.55); }
.atf-modal-card { position:relative; max-width:560px; margin: 7vh auto; background:#fff; border-radius:16px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); overflow:hidden; }
.atf-modal-head { display:flex; align-items:center; justify-content:space-between; padding:14px 16px; background:#054076; color:#fff; }
.atf-modal-close { background:transparent; border:0; color:#fff; font-size:26px; cursor:pointer; line-height:1; }
.atf-modal-body { padding:14px 16px; }
.atf-modal-label { display:block; font-weight:800; margin:10px 0 6px; color:#0f172a; }
.atf-modal-text, .atf-modal-input { width:100%; border:1px solid #e5e7eb; border-radius:12px; padding:12px 12px; font-size:14px; }
.atf-modal-meta { margin:0 0 8px; color:#475569; font-size:13px; }
.atf-modal-status { margin-top:10px; font-weight:700; color:#0f172a; }
.atf-modal-actions { display:flex; justify-content:flex-end; gap:10px; padding:14px 16px; background:#f8fafc; }
.atf-btn { background:#03BDC6; color:#fff; border:0; border-radius:12px; padding:10px 14px; font-weight:900; cursor:pointer; }
.atf-btn-ghost { background:transparent; color:#0f172a; border:1px solid #cbd5e1; }

/* Placeholder should look like a hint, not a pre-filled value */
.ehf-mp input::placeholder,
.ehf-mp textarea::placeholder {
  opacity: 0.35;
}

/* Per-field validation UI */
.ehf-mp-field-error {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #ef4444;
  line-height: 1.25;
}

.ehf-mp-input.ehf-invalid {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35), 0 4px 10px rgba(0,0,0,0.10);
}

.ehf-mp-textarea.ehf-invalid {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.35), 0 4px 10px rgba(0,0,0,0.10);
}

/* ===== Material Planner Loading Overlay ===== */
.ehf-mp-loading-overlay{display:none;position:absolute;inset:0;z-index:60;background:rgba(5,40,80,.72);backdrop-filter:blur(4px);border-radius:16px;}
.ehf-mp-loading-overlay.is-active{display:grid;place-items:center;}
.ehf-mp-loading-card{width:min(380px,88%);background:#fff;border-radius:16px;padding:32px 28px 28px;box-shadow:0 20px 60px rgba(0,0,0,.25);text-align:center;}
.ehf-mp-loading-icons{display:flex;justify-content:center;gap:18px;margin-bottom:20px;}
.ehf-mp-load-icon{font-size:32px;display:inline-block;}
.ehf-mp-load-icon-1{animation:ehfLoadBounce 1.4s ease-in-out infinite;}
.ehf-mp-load-icon-2{animation:ehfLoadBounce 1.4s ease-in-out infinite .25s;}
.ehf-mp-load-icon-3{animation:ehfLoadBounce 1.4s ease-in-out infinite .5s;}
@keyframes ehfLoadBounce{0%,100%{transform:translateY(0);opacity:.6;}50%{transform:translateY(-8px);opacity:1;}}
.ehf-mp-loading-text{font-size:15px;font-weight:700;color:#0c1f3d;margin-bottom:16px;min-height:22px;transition:opacity .3s;}
.ehf-mp-loading-bar-wrap{background:#e5e7eb;border-radius:99px;height:6px;overflow:hidden;}
.ehf-mp-loading-bar{height:100%;background:linear-gradient(90deg,#0e7490,#5eead4);border-radius:99px;width:0%;animation:ehfLoadBar 6s ease-in-out forwards;}
@keyframes ehfLoadBar{0%{width:0%;}40%{width:55%;}70%{width:78%;}90%{width:90%;}100%{width:95%;}}
@media(prefers-reduced-motion:reduce){.ehf-mp-load-icon-1,.ehf-mp-load-icon-2,.ehf-mp-load-icon-3{animation:none;}.ehf-mp-loading-bar{animation:none;width:60%;}}

@keyframes mpHammerStrike{
    0%,100%{transform:rotate(18deg) translate(0,0);}
    50%{transform:rotate(-22deg) translate(-2px,6px);}
}
#ehf-mp-loading-text{
    text-align:center;
    margin:0;
}

/* ===== MP Loader sync with ATF (hammer only) ===== */
.ehf-mp-loading-card{display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;}
.ehf-mp-forge{display:flex;align-items:center;justify-content:center;height:48px;margin:0 0 8px 0;background:transparent;border-radius:0;width:auto;}
.ehf-mp-loading-tools{display:flex;align-items:center;justify-content:center;height:48px;margin:0;}
.ehf-mp-hammer{font-size:36px;display:inline-block;transform-origin:75% 65%;animation:mpHammerStrike 1.1s ease-in-out infinite;}
@keyframes mpHammerStrike{0%,100%{transform:rotate(18deg) translate(0,0);}50%{transform:rotate(-22deg) translate(-2px,6px);}}
#ehf-mp-loading-text{width:100%;text-align:center;margin:0;font-weight:600;}
