/* Стили виджета «battery» — калькулятор износа аккумулятора. Основа — общие классы ik-* */
.bt__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.bt__modes { max-width: 100%; }
.bt__modes button { min-height: 40px; padding: 8px 14px; font-size: 14.5px; }
.bt__unit { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.bt__unit select { min-height: 40px; }

.bt__f { display: grid; gap: 6px; max-width: 320px; }
.bt__f--wide { max-width: none; }
.bt__f > span { font-size: 13.5px; color: var(--muted); }
.bt__f > span b { font-weight: 600; color: inherit; }
.bt input[type="text"] { width: 100%; min-height: 46px; font-size: 17px; font-variant-numeric: tabular-nums; }
.bt textarea {
  width: 100%; min-height: 150px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text-strong); font-family: var(--mono); font-size: 13.5px; line-height: 1.45;
  resize: vertical; outline: none; box-sizing: border-box;
}
.bt textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.bt code { font-size: .92em; overflow-wrap: anywhere; }
.bt__presets .chip { min-height: 38px; padding: 0 14px; font: inherit; font-size: 14px; cursor: pointer; }
.bt__row { display: flex; flex-wrap: wrap; gap: 8px; }
.bt__small { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* Результат */
.bt__result { display: grid; gap: 14px; padding: 16px; border: 1px solid var(--green-line); border-radius: var(--radius); background: var(--green-soft); }
.bt__empty { font-size: 15px; color: var(--muted); }
.bt__main { display: grid; gap: 14px; }
.bt__bat { display: flex; align-items: center; max-width: 360px; }
.bt__bat-body {
  position: relative; flex: 1; height: 58px; padding: 4px; border: 3px solid var(--text-strong); border-radius: 12px;
  background: var(--surface); box-sizing: border-box;
}
.bt__bat-cap { width: 8px; height: 22px; margin-left: 3px; border-radius: 0 4px 4px 0; background: var(--text-strong); }
.bt__bat-fill { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--green); transition: width .35s ease, background-color .2s; }
.bt__bat.is-warn .bt__bat-fill { background: var(--warn); }
.bt__bat.is-bad .bt__bat-fill { background: var(--danger); }
.bt__bat-pct {
  position: absolute; inset: 0; display: grid; place-items: center; font-size: 20px; font-weight: 700;
  color: var(--text-strong); font-variant-numeric: tabular-nums; text-shadow: 0 0 6px var(--surface), 0 0 2px var(--surface);
}
.bt__nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.bt__num { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); }
.bt__num span { font-size: 12.5px; color: var(--muted); }
.bt__num b { font-size: 22px; color: var(--text-strong); font-variant-numeric: tabular-nums; line-height: 1.2; }
.bt__verdict { font-size: 15px; color: var(--text-strong); line-height: 1.5; }
.bt__verdict .ik-badge { vertical-align: 1px; }

.bt__fields { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 0; margin: 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); overflow: hidden; }
.bt__fields dt, .bt__fields dd { margin: 0; padding: 9px 12px; font-size: 14px; border-top: 1px solid var(--border); }
.bt__fields dt:first-of-type, .bt__fields dt:first-of-type + dd { border-top: 0; }
.bt__fields dt { color: var(--muted); font-family: var(--mono); font-size: 13px; overflow-wrap: anywhere; }
.bt__fields dd { color: var(--text-strong); overflow-wrap: anywhere; }
.bt__fields dd small { display: block; color: var(--muted); font-size: 12.5px; }
.bt__fields dd.is-warn { color: var(--warn); }
.bt__fields dd.is-bad { color: var(--danger); }
.bt__note { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.bt__note.is-warn { color: var(--warn); }
.bt [data-bt-copy]:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 560px) {
  .bt__top { align-items: stretch; }
  .bt__modes { display: grid; grid-template-columns: 1fr 1fr 1fr; width: 100%; box-sizing: border-box; }
  .bt__modes button { padding: 8px 4px; font-size: 13px; line-height: 1.2; }
  .bt__unit { width: 100%; justify-content: space-between; }
  .bt__f { max-width: none; }
  .bt__fields { grid-template-columns: 1fr; }
  .bt__fields dt { padding-bottom: 0; }
  .bt__fields dd { border-top: 0; padding-top: 2px; }
  .bt__fields dt:not(:first-of-type) { border-top: 1px solid var(--border); }
  .bt__result .ik-actions .btn { width: 100%; justify-content: center; }
}
