/* === Visibility helper === */
.sandalan-hidden{ display:none !important; }

/* === Container & grid === */
.sandalan-calc{
  border:1px solid var(--sandalan-border,#e6e8ef);
  border-radius:18px;
  padding:22px;
  background:#fff;
  box-shadow:var(--sandalan-shadow,0 10px 30px rgba(10,42,102,.08));
  align-self:flex-start; /* if placed in a column, keep it top-aligned */
}

/* Auto-fit respects the block/container width (great for sidebars) */
.sandalan-calc__grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:16px;
}

/* === Field blocks === */
.sandalan-field{ display:block; }
.sandalan-field--full{ grid-column:1 / -1; }

.sandalan-field__label{
  display:block;
  font-weight:700;
  margin:2px 0 4px;
  line-height:1.25;
}

.sandalan-field .sandalan-help{
  display:block;
  font-weight:600;
  color:#6b7280;
  margin:4px 0 0;
  font-size:.88rem;
}

/* === Affixed inputs === */
.sandalan-affix{
  display:flex;
  align-items:center;
  gap:8px;
  border:1px solid #e6e8ef;
  border-radius:12px;
  padding:10px 12px;
  background:#fff;
  min-height:46px;
}

.sandalan-affix input{
  border:0;
  outline:0;
  width:100%;
  font-size:1.05rem;
  background:#fff;
  line-height:1.25;
  padding:2px 0;
}

.sandalan-affix__prefix,
.sandalan-affix__suffix{
  font-weight:800;
  color:#6b7280;
  white-space:nowrap;
}

.sandalan-affix:focus-within{
  border-color:#b9c6ff;
  box-shadow:0 0 0 3px rgba(59,130,246,.15);
}

/* === Results === */
.sandalan-calc__cards{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(220px, 1fr));
  gap:14px;
  margin-top:16px;
}

.sandalan-card{
  background:#f7faff;
  border:1px solid #e6e8ef;
  border-radius:16px;
  padding:14px;
}

.sandalan-card__label{
  color:#6b7280;
  font-weight:700;
  margin-bottom:6px;
  line-height:1.25;
  white-space:normal;
  word-break:normal;
  hyphens:auto;
}

.sandalan-card__value{
  font-weight:800;
  font-size:1.25rem;
}

.sandalan-card__sub{
  color:#6b7280;
  font-weight:700;
  margin-top:4px;
}

.sandalan-calc__fine{
  color:#6b7280;
  margin-top:12px;
  line-height:1.5;
}
