/* ═══════════════════════════════════════════
   RSK23 CALC — PHONE GATE CSS v2 (2026-04-24)
   ═══════════════════════════════════════════ */

/* 1. Блюр всех ключевых цифр пока активен gate */
body.k-gate-active .kalk-right #kr-works,
body.k-gate-active .kalk-right #kr-design,
body.k-gate-active .kalk-right #kr-plumb,
body.k-gate-active .kalk-right #kr-elec,
body.k-gate-active .kalk-right #kr-mats,
body.k-gate-active .kalk-right #kr-total,
body.k-gate-active .kalk-right #kr-min,
body.k-gate-active .kalk-right #kr-mid,
body.k-gate-active .kalk-right #kr-max {
  filter: blur(7px) saturate(.8);
  transition: filter .35s ease;
  user-select: none;
  pointer-events: none;
}

/* На мобильных блюр сильнее */
@media (max-width: 820px) {
  body.k-gate-active .kalk-right #kr-works,
  body.k-gate-active .kalk-right #kr-design,
  body.k-gate-active .kalk-right #kr-plumb,
  body.k-gate-active .kalk-right #kr-elec,
  body.k-gate-active .kalk-right #kr-mats,
  body.k-gate-active .kalk-right #kr-total,
  body.k-gate-active .kalk-right #kr-min,
  body.k-gate-active .kalk-right #kr-mid,
  body.k-gate-active .kalk-right #kr-max {
    filter: blur(9px) saturate(.8);
  }
}

/* После unlock — плавный возврат чёткости */
body.k-unlocked .kalk-right #kr-works,
body.k-unlocked .kalk-right #kr-design,
body.k-unlocked .kalk-right #kr-plumb,
body.k-unlocked .kalk-right #kr-elec,
body.k-unlocked .kalk-right #kr-mats,
body.k-unlocked .kalk-right #kr-total,
body.k-unlocked .kalk-right #kr-min,
body.k-unlocked .kalk-right #kr-mid,
body.k-unlocked .kalk-right #kr-max {
  filter: none !important;
  user-select: auto;
  pointer-events: auto;
}

/* 2. Плашка-шлюз (компактная) */
.k-phone-gate {
  position: relative;
  margin: 0 0 14px;
  padding: 14px 16px 14px;
  border-radius: 14px;
  background: linear-gradient(145deg, #0D1B2A 0%, #183049 100%);
  color: #fdfdfb !important;
  box-shadow: 0 12px 28px rgba(13,27,42,.25), 0 0 0 1px rgba(91,168,181,.22) inset;
  animation: kpgIn .45s cubic-bezier(.2,.9,.3,1.15) both;
  overflow: hidden;
}
.k-phone-gate * { color: #fdfdfb !important; }
.k-phone-gate .kpg-title { color: #fff !important; }
.k-phone-gate #kpg-phone::placeholder { color: rgba(253,253,251,.55) !important; }
.k-phone-gate .kpg-btn { color: #fff !important; }
.k-phone-gate .kpg-err,
.k-phone-gate .kpg-err.show { color: #ffb3a5 !important; }
.k-phone-gate::before {
  content: ;
  position: absolute; inset: -2px;
  background: conic-gradient(from 140deg, #5BA8B5, transparent 30%, #2d7a87 55%, transparent 80%, #5BA8B5);
  opacity: .22;
  z-index: 0;
  animation: kpgSpin 8s linear infinite;
  pointer-events: none;
}
.k-phone-gate .kpg-inner { position: relative; z-index: 1; }

@keyframes kpgIn {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes kpgSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.k-phone-gate .kpg-title {
  font-family: Montserrat, sans-serif;
  font-size: 15px;
  font-weight: 800;
  text-align: center;
  color: #fff;
  margin: 0 0 10px;
  letter-spacing: -.01em;
}

.k-phone-gate .kpg-form {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.k-phone-gate .kpg-field { position: relative; }
.k-phone-gate #kpg-phone {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 12px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(91,168,181,.35);
  border-radius: 10px;
  color: #fff;
  font-family: Montserrat, Inter, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  text-align: center;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.k-phone-gate #kpg-phone::placeholder {
  color: rgba(232,226,217,.55);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0;
  text-align: center;
}
.k-phone-gate #kpg-phone:focus {
  border-color: #5BA8B5;
  background: rgba(255,255,255,.10);
  box-shadow: 0 0 0 4px rgba(91,168,181,.15);
}

.k-phone-gate .kpg-agree {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 12px;
  color: #ffffff !important;
  line-height: 1.4;
  cursor: pointer;
  user-select: none;
  padding: 0;
}
.k-phone-gate .kpg-agree input {
  width: 16px; height: 16px;
  margin: 1px 0 0;
  accent-color: #5BA8B5;
  cursor: pointer;
  flex: none;
}

.k-phone-gate .kpg-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important; height: 1px !important;
  opacity: 0 !important;
}

.k-phone-gate .kpg-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, #5BA8B5 0%, #2d7a87 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: Montserrat, sans-serif;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, opacity .2s, filter .2s;
  margin-top: 2px;
}
.k-phone-gate .kpg-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(91,168,181,.35);
}
.k-phone-gate .kpg-btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(.35);
}
.k-phone-gate .kpg-btn.is-loading {
  pointer-events: none;
}
.k-phone-gate .kpg-btn.is-loading svg {
  animation: kpgSpin 1.1s linear infinite;
}

.k-phone-gate .kpg-err {
  min-height: 0;
  max-height: 0;
  overflow: hidden;
  font-size: 12.5px;
  color: #ff9a8b;
  background: rgba(255,100,80,.08);
  border-radius: 8px;
  padding: 0 12px;
  text-align: center;
  transition: max-height .25s ease, padding .25s ease, margin .25s ease;
}
.k-phone-gate .kpg-err.show {
  max-height: 80px;
  padding: 10px 12px;
  margin-top: 2px;
}

.price-light.calc-bg .k-phone-gate {
  box-shadow: 0 20px 48px rgba(13,27,42,.22), 0 0 0 1px rgba(91,168,181,.28) inset;
}

/* Мобильная адаптация */
@media (max-width: 480px) {
  .k-phone-gate {
    padding: 22px 18px 18px;
    border-radius: 14px;
  }
  .k-phone-gate .kpg-title { font-size: 18px; }
  .k-phone-gate #kpg-phone { font-size: 16px; padding: 13px 14px; }
  .k-phone-gate .kpg-btn   { font-size: 13px; padding: 13px 16px; }
}

/* Иконка телефона над заголовком */
.k-phone-gate .kpg-icon {
  text-align: center;
  margin-bottom: 10px;
  line-height: 1;
}
.k-phone-gate .kpg-icon svg {
  stroke: #5BA8B5;
  filter: drop-shadow(0 0 8px rgba(91,168,181,.45));
}

/* Trust-bar внизу формы */
.k-phone-gate .kpg-trust {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
  opacity: 1;
  font-size: 12px;
  font-weight: 600;
  color: #5BA8B5 !important;
}
.k-phone-gate .kpg-trust span {
  display: flex;
  align-items: center;
  gap: 4px;
}
.k-phone-gate .kpg-trust svg {
  opacity: .85;
  flex-shrink: 0;
}

/* Явные цвета — перебивают универсальный * */
.k-phone-gate .kpg-agree span { color: #ffffff !important; }
.k-phone-gate .kpg-trust span { color: #5BA8B5 !important; font-weight: 600 !important; }
.k-phone-gate .kpg-trust svg  { color: #5BA8B5 !important; stroke: #5BA8B5 !important; }

/* Перебиваем .price-light.calc-bg .kalk-root * { color: inherit !important } */
.price-light.calc-bg .kalk-root .k-phone-gate .kpg-agree span { color: #ffffff !important; }
.price-light.calc-bg .kalk-root .k-phone-gate .kpg-trust span { color: #5BA8B5 !important; font-weight: 600 !important; }
.price-light.calc-bg .kalk-root .k-phone-gate .kpg-trust svg  { color: #5BA8B5 !important; stroke: #5BA8B5 !important; }

/* Заголовок «Узнайте точную стоимость» — белый */
.price-light.calc-bg .kalk-root .k-phone-gate .kpg-title { color: #ffffff !important; }
