/* Green Light Calculators — фронтенд */

.glm-calc{
  --glm-accent:#1e6deb;
  --glm-accent-soft:#f0f5ff;
  --glm-ink:#12143D;
  --glm-muted:#8A8FB0;
  --glm-line:#E7E9F4;
  --glm-success:#0E8A57;
  --glm-success-soft:#ECFDF5;
  --glm-radius:16px;
  --glm-tabs-d:4;
  --glm-tabs-t:2;
  --glm-tabs-m:1;
  color:var(--glm-ink);
  font-family:inherit;
}
.glm-calc *{box-sizing:border-box;}

/* ---------- Табы ---------- */
.glm-tabs{
  display:grid;
  grid-template-columns:repeat(var(--glm-tabs-d),minmax(0,1fr));
  gap:14px;
  margin-bottom:22px;
}
.glm-tab{
  display:flex;align-items:center;gap:12px;
  padding:14px 16px;
  background:#fff;
  border:1px solid var(--glm-line);
  border-radius:var(--glm-radius);
  cursor:pointer;text-align:left;
  transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
  font:inherit;color:inherit;width:100%;
  box-shadow:none;
  -webkit-appearance:none;appearance:none;
}
/* перебиваем заливку кнопок из темы */
.glm-tab:hover,
.glm-tab:focus,
.glm-tab:active,
.glm-tab:focus-visible,
.glm-tab.is-active:hover,
.glm-tab.is-active:focus{
  background:#fff !important;
  background-color:#fff !important;
  background-image:none !important;
  color:inherit !important;
  outline:none;
}
.glm-tab:hover{
  border-color:var(--glm-line);
  box-shadow:0 10px 24px rgba(18,20,61,.12);
  transform:translateY(-2px);
}
.glm-tab:hover .glm-tab__title,
.glm-tab:focus .glm-tab__title{color:inherit;}
.glm-tab:focus-visible{
  box-shadow:0 0 0 3px color-mix(in srgb,var(--glm-accent) 30%,transparent);
}
.glm-tab.is-active{
  border-color:var(--glm-accent);
  box-shadow:0 0 0 2px color-mix(in srgb,var(--glm-accent) 22%,transparent);
}
.glm-tab.is-active:hover{
  box-shadow:0 0 0 2px color-mix(in srgb,var(--glm-accent) 22%,transparent),
             0 10px 24px rgba(18,20,61,.12);
}
.glm-tab.is-active .glm-tab__title,
.glm-tab.is-active:hover .glm-tab__title{color:var(--glm-accent) !important;}
.glm-tab__icon{
  flex:none;width:38px;height:38px;border-radius:11px;
  display:flex;align-items:center;justify-content:center;
  font-size:17px;line-height:1;
}
.glm-tab__icon svg{width:18px;height:18px;display:block;}
.glm-tab__txt{min-width:0;display:flex;flex-direction:column;gap:2px;}
.glm-tab__title{font-size:14.5px;font-weight:700;line-height:1.25;}
.glm-tab.is-active .glm-tab__title{color:var(--glm-accent);}
.glm-tab__sub{font-size:12.5px;color:var(--glm-muted);font-weight:500;line-height:1.25;}

/* ---------- Панель ---------- */
.glm-panel{
  display:none;
  background:#fff;
  border:1px solid var(--glm-line);
  border-radius:calc(var(--glm-radius) + 6px);
  overflow:hidden;
}
.glm-panel.is-active{display:block;}

.glm-panel__head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:20px;
  padding:26px 30px;
  border-bottom:1px solid var(--glm-line);
}
.glm-eyebrow{
  font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;
  color:var(--glm-muted);margin-bottom:7px;
}
.glm-heading{
  margin:0;font-size:26px;font-weight:800;letter-spacing:-.02em;line-height:1.2;
}
.glm-badge{
  flex:none;
  background:var(--glm-accent-soft);color:var(--glm-accent);
  font-size:13px;font-weight:700;
  padding:8px 16px;border-radius:999px;white-space:nowrap;
}

.glm-panel__body{
  display:grid;grid-template-columns:1fr 1fr;
}
.glm-inputs{
  padding:28px 30px;
  border-right:1px solid var(--glm-line);
  display:flex;flex-direction:column;gap:22px;
}
.glm-output{padding:28px 30px;}

/* ---------- Поля ---------- */
.glm-field.is-hidden{display:none;}
.glm-field__top{
  display:flex;align-items:baseline;justify-content:space-between;gap:14px;margin-bottom:9px;
}
.glm-field__label{font-size:14px;font-weight:600;color:#3C4066;}
.glm-field__value{font-size:15px;font-weight:800;color:var(--glm-accent);}
.glm-hint{margin:8px 0 0;font-size:12.5px;line-height:1.5;color:var(--glm-muted);}

.glm-range{
  -webkit-appearance:none;appearance:none;
  width:100%;height:6px;border-radius:99px;
  background:linear-gradient(to right,var(--glm-accent) var(--glm-fill,0%),var(--glm-line) var(--glm-fill,0%));
  outline:none;cursor:pointer;
}
.glm-range::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;
  width:22px;height:22px;border-radius:50%;
  background:#fff;border:3px solid var(--glm-accent);
  box-shadow:0 2px 6px rgba(18,20,61,.18);cursor:pointer;
}
.glm-range::-moz-range-thumb{
  width:20px;height:20px;border-radius:50%;
  background:#fff;border:3px solid var(--glm-accent);
  box-shadow:0 2px 6px rgba(18,20,61,.18);cursor:pointer;
}
.glm-range__ends{
  display:flex;justify-content:space-between;
  font-size:12px;color:var(--glm-muted);margin-top:7px;font-weight:600;
}

.glm-number,.glm-select{
  width:100%;padding:13px 14px;
  border:1px solid var(--glm-line);border-radius:12px;
  background:#FBFCFF;font-size:15px;color:var(--glm-ink);font-family:inherit;
}
.glm-select{
  appearance:none;
  background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A8FB0' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 15px center;background-size:12px;
  padding-right:38px;cursor:pointer;
}
.glm-number:focus,.glm-select:focus{outline:none;border-color:var(--glm-accent);}

.glm-pills{display:flex;flex-wrap:wrap;gap:9px;}
.glm-pill{
  padding:11px 18px;border-radius:999px;
  border:1px solid var(--glm-line);background:#fff;
  font:inherit;font-size:14px;font-weight:600;color:#3C4066;
  cursor:pointer;transition:all .16s ease;
  -webkit-appearance:none;appearance:none;
}
.glm-pill:hover,
.glm-pill:focus{
  background:#fff !important;
  background-image:none !important;
  color:#3C4066 !important;
  border-color:color-mix(in srgb,var(--glm-accent) 40%,var(--glm-line));
  outline:none;
}
.glm-pill.is-active,
.glm-pill.is-active:hover,
.glm-pill.is-active:focus{
  background:var(--glm-accent) !important;
  background-image:none !important;
  border-color:var(--glm-accent);
  color:#fff !important;
}

.glm-check{display:flex;align-items:center;gap:10px;font-size:14px;cursor:pointer;}
.glm-check input{width:18px;height:18px;accent-color:var(--glm-accent);}

/* ---------- Результат ---------- */
.glm-main{
  background:var(--glm-accent-soft);
  border-radius:var(--glm-radius);
  padding:26px 22px;text-align:center;margin-bottom:22px;
}
.glm-main__label{
  font-size:11.5px;font-weight:800;letter-spacing:.1em;text-transform:uppercase;
  color:var(--glm-accent);margin-bottom:8px;
}
.glm-main__value{
  font-size:44px;font-weight:800;letter-spacing:-.03em;line-height:1;color:var(--glm-accent);
}
.glm-main__sub{font-size:13.5px;color:var(--glm-muted);font-weight:600;margin-top:9px;}

.glm-row{
  display:flex;align-items:center;justify-content:space-between;gap:16px;
  padding:15px 0;border-bottom:1px solid var(--glm-line);
  font-size:14.5px;
}
.glm-row:last-child{border-bottom:none;}
.glm-row span{color:#3C4066;}
.glm-row strong{font-weight:700;white-space:nowrap;}

.glm-bar{margin-top:18px;}
.glm-bar__track{height:9px;border-radius:99px;background:var(--glm-line);overflow:hidden;}
.glm-bar__fill{height:100%;border-radius:99px;transition:width .3s ease;}
.glm-bar__legend{
  display:flex;justify-content:space-between;gap:12px;
  margin-top:9px;font-size:12.5px;font-weight:600;color:var(--glm-muted);
}
.glm-bar__legend i{
  display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:6px;
}
.glm-bar__legend i.is-muted{background:var(--glm-line);}

.glm-note{
  display:flex;gap:11px;align-items:flex-start;
  background:var(--glm-success-soft);
  border:1px solid color-mix(in srgb,var(--glm-success) 25%,transparent);
  border-radius:14px;padding:15px 16px;margin-top:18px;
  font-size:13.5px;line-height:1.5;color:#1F6B4D;
}
.glm-note__icon{
  flex:none;width:22px;height:22px;border-radius:7px;
  background:#D7F5E7;color:var(--glm-success);
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:12px;
}
.glm-note--warning{
  background:#FFF7ED;border-color:#FDBA74;color:#9A3412;
}
.glm-note--warning .glm-note__icon{background:#FFEDD5;color:#C2410C;}
.glm-note--plain{background:#F8FAFC;border-color:var(--glm-line);color:#3C4066;}
.glm-note--plain .glm-note__icon{background:#EEF1F8;color:var(--glm-muted);}

.glm-disclaimer{
  margin:20px 0 0;font-size:12.5px;line-height:1.6;color:var(--glm-muted);
}

/* ---------- Таблица сравнения ---------- */
.glm-table-scroll{overflow-x:auto;margin-top:6px;}
.glm-table{width:100%;border-collapse:collapse;font-size:13.5px;min-width:680px;}
.glm-table th{
  text-align:left;padding:12px 14px;
  background:#F8FAFC;color:var(--glm-muted);
  font-size:11px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;
  border-bottom:1px solid var(--glm-line);white-space:nowrap;
}
.glm-table td{
  padding:14px;border-bottom:1px solid var(--glm-line);vertical-align:top;
}
.glm-table tr:last-child td{border-bottom:none;}
.glm-table td:first-child{font-weight:700;}

/* ---------- Подвал ---------- */
.glm-panel__foot{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:22px 30px;border-top:1px solid var(--glm-line);
}
.glm-cta__note{font-size:14.5px;font-weight:600;color:#3C4066;}
.glm-cta{
  background:var(--glm-accent);color:#fff;
  font:inherit;font-size:15px;font-weight:700;
  padding:15px 26px;border:none;border-radius:13px;cursor:pointer;
  box-shadow:0 12px 26px color-mix(in srgb,var(--glm-accent) 28%,transparent);
  transition:filter .18s ease,transform .18s ease;
  -webkit-appearance:none;appearance:none;
}
.glm-cta:hover,
.glm-cta:focus{
  background:var(--glm-accent) !important;
  background-image:none !important;
  color:#fff !important;
  filter:brightness(.92);transform:translateY(-1px);outline:none;
}

/* ---------- Адаптив ---------- */
@media (max-width:1024px){
  .glm-tabs{grid-template-columns:repeat(var(--glm-tabs-t),minmax(0,1fr));}
  .glm-panel__body{grid-template-columns:1fr;}
  .glm-inputs{border-right:none;border-bottom:1px solid var(--glm-line);}
  .glm-main__value{font-size:38px;}
}
@media (max-width:767px){
  .glm-tabs{grid-template-columns:repeat(var(--glm-tabs-m),minmax(0,1fr));}
  .glm-panel__head{flex-direction:column;align-items:flex-start;gap:12px;padding:20px;}
  .glm-heading{font-size:21px;}
  .glm-inputs,.glm-output{padding:20px;}
  .glm-panel__foot{flex-direction:column;align-items:stretch;text-align:center;padding:20px;}
  .glm-cta{width:100%;}
  .glm-main__value{font-size:34px;}
}
