/* Customer calibration drawer */
.kl-keg-card-actions{
  grid-template-columns:auto auto auto;
  grid-template-areas:
    "status edit more"
    "updated calibrate more";
  align-items:center;
}
.kl-keg-card-actions .portal-status{grid-area:status}
.kl-keg-card-actions>small{grid-area:updated;text-align:right}
.kl-card-edit{grid-area:edit;grid-row:auto;grid-column:auto}
.kl-card-calibrate{
  grid-area:calibrate;
  min-width:78px;
  min-height:32px;
  padding:0 11px;
  border:1px solid #3b4e59;
  border-radius:7px;
  background:#111d24;
  color:#f7c44a;
  font-size:10px;
  font-weight:850;
  cursor:pointer;
}
.kl-card-calibrate:hover{border-color:#ffbd2e;background:#17262f;color:#ffd35a}
.kl-card-more{grid-area:more;grid-row:auto;grid-column:auto}

.page-template-page-account.kl-calibration-open{overflow:hidden;overscroll-behavior:none}
.kl-calibration-overlay{
  position:fixed;
  z-index:719;
  inset:0;
  background:rgba(0,0,0,.62);
  backdrop-filter:blur(3px);
}
.kl-calibration-overlay[hidden]{display:none}
.kl-calibration-panel{
  position:fixed;
  z-index:720;
  top:65px;
  right:0;
  width:min(455px,96vw);
  height:calc(100vh - 65px);
  padding:24px 24px 30px;
  overflow:auto;
  box-sizing:border-box;
  border-left:1px solid #344650;
  background:
    radial-gradient(circle at 100% 0,rgba(255,189,46,.08),transparent 28%),
    linear-gradient(160deg,#17242c,#0c1419 72%);
  box-shadow:-28px 0 70px rgba(0,0,0,.58);
  transform:translateX(105%);
  transition:transform .25s ease;
}
.admin-bar .kl-calibration-panel{top:97px;height:calc(100vh - 97px)}
.kl-calibration-panel.open{transform:none}
.kl-calibration-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding-bottom:16px;
  border-bottom:1px solid #33434c;
}
.kl-calibration-head h2{margin:5px 0 0;color:#fff;font-size:27px;letter-spacing:-.6px}
.kl-calibration-head button{
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border:0;
  background:transparent;
  color:#c2ccd1;
  font-size:29px;
  cursor:pointer;
}
.kl-calibration-device{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:17px 0;
}
.kl-calibration-device strong,.kl-calibration-device span{display:block}
.kl-calibration-device strong{font-size:18px}
.kl-calibration-device>div span{margin-top:4px;color:#88979f;font-size:9px}
.kl-calibration-device .portal-status{
  display:flex;
  align-items:center;
  gap:6px;
  color:#9aa8af;
  font-size:10px;
}
.kl-calibration-device .portal-status i{width:8px;height:8px;border-radius:50%;background:#73828b}
.kl-calibration-device .portal-status.online{color:#50eb70}
.kl-calibration-device .portal-status.online i{background:#45e66a;box-shadow:0 0 10px rgba(69,230,106,.55)}
.kl-calibration-metrics{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-bottom:13px;
}
.kl-calibration-metrics>div{
  min-width:0;
  padding:11px 10px;
  border:1px solid #2f414b;
  border-radius:9px;
  background:rgba(7,13,16,.5);
}
.kl-calibration-metrics span,.kl-calibration-metrics strong{display:block}
.kl-calibration-metrics span{color:#8f9da5;font-size:8px;text-transform:uppercase;letter-spacing:.7px}
.kl-calibration-metrics strong{margin-top:5px;color:#fff;font-size:12px;overflow-wrap:anywhere}
.kl-calibration-message{
  margin:0 0 14px;
  padding:12px 13px;
  border:1px solid rgba(255,189,46,.23);
  border-radius:9px;
  background:rgba(255,189,46,.07);
  color:#f8d477;
  font-size:11px;
  line-height:1.45;
}
.kl-calibration-steps{display:grid;gap:11px}
.kl-calibration-steps section{
  position:relative;
  display:grid;
  grid-template-columns:34px 1fr;
  gap:10px 12px;
  padding:15px;
  border:1px solid #2e404a;
  border-radius:11px;
  background:rgba(10,17,21,.68);
  transition:border-color .2s ease,background .2s ease;
}
.kl-calibration-steps section.active{
  border-color:rgba(255,189,46,.58);
  background:linear-gradient(130deg,rgba(255,189,46,.08),rgba(10,17,21,.76));
}
.kl-calibration-steps section.done{border-color:rgba(69,230,106,.38)}
.kl-cal-step-number{
  display:grid;
  place-items:center;
  width:31px;
  height:31px;
  border:1px solid #41535e;
  border-radius:50%;
  background:#17242c;
  color:#c7d1d6;
  font-size:12px;
  font-weight:900;
}
.kl-calibration-steps section.active .kl-cal-step-number{border-color:#ffbd2e;background:#ffbd2e;color:#111}
.kl-calibration-steps section.done .kl-cal-step-number{border-color:#45e66a;background:#153523;color:#68ed82}
.kl-calibration-steps h3{margin:1px 0 4px;color:#fff;font-size:15px}
.kl-calibration-steps p{margin:0;color:#98a6ae;font-size:10px;line-height:1.5}
.kl-calibration-steps section>label{
  grid-column:1/-1;
  display:block;
  color:#b8c3c9;
  font-size:10px;
  font-weight:700;
}
.kl-cal-weight-control{
  display:grid;
  grid-template-columns:minmax(0,1fr) 92px;
  gap:8px;
  margin-top:7px;
}
.kl-cal-weight-control input,.kl-cal-weight-control select{
  width:100%;
  min-height:43px;
  box-sizing:border-box;
  border:1px solid #3a4a54;
  border-radius:7px;
  background:#17242c;
  color:#fff;
  padding:9px 11px;
  outline:none;
}
.kl-cal-weight-control input:focus,.kl-cal-weight-control select:focus{border-color:#ffbd2e}
.kl-cal-action{
  grid-column:1/-1;
  width:100%;
  min-height:43px;
  border:1px solid #3b4e59;
  border-radius:8px;
  background:#18262e;
  color:#eef3f5;
  font-weight:850;
  cursor:pointer;
}
.kl-cal-action.primary{border:0;background:linear-gradient(#ffd158,#f3aa18);color:#111}
.kl-cal-action:disabled{cursor:not-allowed;opacity:.42;filter:saturate(.45)}
.kl-calibration-steps section>small{
  grid-column:1/-1;
  color:#7f8e96;
  font-size:9px;
  line-height:1.4;
}
.kl-calibration-review{
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:7px;
}
.kl-calibration-review>div{
  padding:9px 8px;
  border:1px solid #2e4049;
  border-radius:8px;
  background:#0a1115;
}
.kl-calibration-review span,.kl-calibration-review strong{display:block}
.kl-calibration-review span{color:#829099;font-size:8px}
.kl-calibration-review strong{margin-top:4px;color:#fff;font-size:11px;overflow-wrap:anywhere}
.kl-calibration-footer{
  margin-top:13px;
  padding-top:13px;
  border-top:1px solid #2f4049;
}
.kl-calibration-footer button{
  width:100%;
  min-height:44px;
  border:1px solid #3a4a54;
  border-radius:8px;
  background:#1b2931;
  color:#d7dfe2;
  font-weight:800;
  cursor:pointer;
}
.kl-calibration-footer p{margin:11px 2px 0;color:#7f8d95;font-size:9px;line-height:1.5}

@media(max-width:720px){
  .kl-keg-card-actions{
    grid-template-columns:auto auto auto;
    grid-template-areas:
      "status edit more"
      "updated calibrate more";
  }
  .kl-card-calibrate{min-width:68px;min-height:30px;padding:0 8px}
  .kl-calibration-overlay{z-index:739}
  .kl-calibration-panel{
    z-index:740;
    top:0!important;
    width:100%;
    height:100dvh;
    padding:calc(17px + env(safe-area-inset-top)) 14px calc(18px + env(safe-area-inset-bottom));
    border-left:0;
  }
  .admin-bar .kl-calibration-panel{top:46px!important;height:calc(100dvh - 46px)}
  .kl-calibration-head{
    position:sticky;
    z-index:5;
    top:calc(-17px - env(safe-area-inset-top));
    margin:calc(-17px - env(safe-area-inset-top)) -14px 0;
    padding:calc(17px + env(safe-area-inset-top)) 14px 14px;
    background:linear-gradient(180deg,#17242c 88%,rgba(23,36,44,.95));
  }
  .admin-bar .kl-calibration-head{top:-17px}
  .kl-calibration-metrics{grid-template-columns:1fr 1fr}
  .kl-calibration-metrics>div:last-child{grid-column:1/-1}
  .kl-calibration-steps section{padding:13px}
  .kl-cal-weight-control input,.kl-cal-weight-control select{font-size:16px}
  .kl-cal-action{min-height:48px}
  .kl-calibration-footer{padding-bottom:calc(10px + env(safe-area-inset-bottom))}
}
@media(max-width:390px){
  .kl-card-calibrate{font-size:9px;min-width:61px}
  .kl-calibration-review{grid-template-columns:1fr}
}
