/* ============================================================
   HERRAMIENTAS — ported from herramientas/index.html mockup
   All classes prefixed `ht-` and variables scoped to `.ht-root`
   to avoid collisions with Bootstrap / MudBlazor globals.
   ============================================================ */

.ht-root{
  --ht-blue:#155EEF;
  --ht-blue-dark:#1251d4;
  --ht-dark:#0F172A;
  --ht-gray:#64748B;
  --ht-gray2:#94A3B8;
  --ht-border:#E2E8F0;
  --ht-surface:#F8FAFC;
  --ht-white:#FFFFFF;
  --ht-blue-soft:rgba(21,94,239,.08);
  --ht-blue-mid:rgba(21,94,239,.15);
  font-family:'Sora','Segoe UI',system-ui,sans-serif;
  color:var(--ht-dark);
  line-height:1.6;
}

.ht-root *{box-sizing:border-box}
/* Neutralize Bootstrap/MudBlazor global element styles bleeding into raw
   h1/p/button/span this page uses. */
.ht-root h1,.ht-root p,.ht-root span,.ht-root button{margin:0}
.ht-root button{font-family:inherit;line-height:normal;text-transform:none}

/* Twemoji: emojis replaced by inline SVG <img class="emoji">; size to text. */
.ht-root img.emoji{height:1em;width:1em;vertical-align:-0.125em;display:inline-block;margin:0}

.ht-wrap{max-width:1100px;margin:0 auto;padding:0 8px}

/* ── HEADER ── */
.ht-header{padding:28px 0 8px}
.ht-badge{
  display:inline-flex;align-items:center;gap:8px;
  background:var(--ht-blue-soft);border:1px solid var(--ht-blue-mid);
  color:var(--ht-blue);font-size:11.5px;font-weight:600;
  letter-spacing:.06em;text-transform:uppercase;
  padding:6px 14px;border-radius:999px;
}
.ht-badge::before{content:'';width:6px;height:6px;background:var(--ht-blue);border-radius:50%}
.ht-title{
  font-family:'Space Grotesk','Sora',sans-serif;
  font-size:clamp(2rem,4.5vw,3rem);font-weight:700;
  line-height:1.08;letter-spacing:-.02em;color:var(--ht-dark);margin-top:12px;
}
.ht-title span{color:var(--ht-blue)}

/* ── GRID + CARDS ── */
.ht-grid{
  display:grid;grid-template-columns:repeat(3,1fr);gap:20px;
  padding:24px 0 60px;
}
.ht-card{
  background:var(--ht-white);
  border:1.5px solid var(--ht-border);border-radius:16px;
  padding:28px 24px;
  display:flex;flex-direction:column;gap:16px;
  position:relative;overflow:hidden;transition:all .2s;
}
.ht-card::before{
  content:'';position:absolute;top:0;left:0;right:0;height:3px;
  background:var(--ht-blue);transform:scaleX(0);transform-origin:left;
  transition:transform .2s;
}
.ht-card:hover{
  border-color:rgba(21,94,239,.3);
  box-shadow:0 8px 32px rgba(21,94,239,.1);
  transform:translateY(-3px);
}
.ht-card:hover::before{transform:scaleX(1)}
.ht-card-top{display:flex;align-items:flex-start;justify-content:space-between}
.ht-card-icon{
  width:48px;height:48px;background:var(--ht-blue-soft);border-radius:12px;
  display:flex;align-items:center;justify-content:center;font-size:22px;
}
.ht-card-badge{
  font-size:11px;font-weight:600;color:var(--ht-blue);
  background:var(--ht-blue-soft);border:1px solid var(--ht-blue-mid);
  padding:3px 10px;border-radius:999px;white-space:nowrap;
}
.ht-card-name{
  font-family:'Space Grotesk','Sora',sans-serif;
  font-size:1.1rem;font-weight:700;color:var(--ht-dark);letter-spacing:-.01em;
}
.ht-card-desc{font-size:13px;color:var(--ht-gray);line-height:1.65}

/* ── CALC LIST ── */
.ht-calc-list{display:flex;flex-direction:column;gap:6px;margin-top:4px}
.ht-root .ht-calc-btn{
  text-align:left;
  background:var(--ht-surface);
  border:1.5px solid var(--ht-border);border-radius:9px;
  padding:10px 14px;
  font-size:13px;font-weight:600;color:var(--ht-dark);
  cursor:pointer;transition:all .15s;
  display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;
}
.ht-calc-btn:hover{
  background:var(--ht-blue-soft);
  border-color:rgba(21,94,239,.3);
  color:var(--ht-blue);
  transform:translateX(3px);
}
.ht-root .ht-expand-btn{
  background:none;
  border:1.5px dashed var(--ht-border);border-radius:9px;
  padding:9px 14px;
  font-size:12px;font-weight:600;color:var(--ht-gray);
  cursor:pointer;transition:all .15s;text-align:left;margin-top:2px;width:100%;
}
.ht-expand-btn:hover{
  border-color:var(--ht-blue);color:var(--ht-blue);background:var(--ht-blue-soft);
}

/* ── MODAL (external calculator iframe) ── */
.ht-modal-overlay{
  position:fixed;inset:0;
  background:rgba(15,23,42,.6);backdrop-filter:blur(6px);
  /* Above MudBlazor chrome (drawer 1100, app bar 1300) so the dim covers the
     whole screen; below the snackbar (1500) so toasts still render on top. */
  z-index:1400;
  display:flex;align-items:center;justify-content:center;padding:20px;
  opacity:0;pointer-events:none;transition:opacity .25s;
}
.ht-modal-overlay.open{opacity:1;pointer-events:all}
.ht-modal{
  background:#fff;border-radius:16px;
  width:100%;max-width:960px;height:85vh;
  display:flex;flex-direction:column;
  box-shadow:0 24px 64px rgba(15,23,42,.2);
  transform:translateY(16px) scale(.98);
  transition:transform .28s ease,opacity .28s ease;
  opacity:0;overflow:hidden;
}
.ht-modal-overlay.open .ht-modal{transform:translateY(0) scale(1);opacity:1}
.ht-modal-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;border-bottom:1px solid var(--ht-border);flex-shrink:0;
}
.ht-modal-title{
  font-family:'Space Grotesk','Sora',sans-serif;
  font-size:15px;font-weight:700;color:var(--ht-dark);
}
.ht-root .ht-modal-close{
  width:32px;height:32px;border-radius:8px;
  border:1.5px solid var(--ht-border);background:var(--ht-surface);
  color:var(--ht-gray);font-size:14px;cursor:pointer;
  display:flex;align-items:center;justify-content:center;transition:all .15s;
}
.ht-modal-close:hover{background:#fef2f2;border-color:#fca5a5;color:#dc2626}
.ht-modal-iframe{flex:1;border:none;width:100%}

/* ── RESPONSIVE ── */
@media(max-width:900px){
  .ht-grid{grid-template-columns:1fr 1fr}
}
@media(max-width:600px){
  .ht-grid{grid-template-columns:1fr}
  .ht-modal{height:92vh;border-radius:14px}
}
