/* ЦинКо — чат-бот подбора тарифа. Стили изолированы префиксом zc-. */

.zc-launcher {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 52px;
  padding: 0 18px 0 14px;
  border: 1px solid rgba(143, 240, 205, 0.32);
  border-radius: 999px;
  background: linear-gradient(135deg, #102b2b, #0b1620);
  box-shadow: 0 16px 38px -14px rgba(11, 22, 32, 0.75);
  color: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.zc-launcher[hidden],
.zc-input[hidden] {
  display: none !important;
}

.pricing-chat-cta {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}

.pricing-chat-cta .icon {
  width: 16px;
  height: 16px;
}

.zc-launcher:hover {
  transform: translateY(-2px);
  border-color: rgba(143, 240, 205, 0.6);
  box-shadow: 0 20px 45px -14px rgba(11, 22, 32, 0.85);
}

.zc-launcher__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #12a67a;
  color: #fff;
}

.zc-launcher__icon svg {
  width: 17px;
  height: 17px;
}

.zc-launcher__dot {
  width: 7px;
  height: 7px;
  margin-left: 2px;
  border-radius: 50%;
  background: #8ff0cd;
  box-shadow: 0 0 0 4px rgba(143, 240, 205, 0.12);
}

.zc-chat {
  position: fixed;
  right: 22px;
  bottom: calc(22px + env(safe-area-inset-bottom));
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(390px, calc(100vw - 24px));
  height: min(620px, calc(100dvh - 44px));
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(11, 22, 32, 0.12);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 28px 80px -24px rgba(11, 22, 32, 0.45);
  font-family: "Segoe UI", Inter, Arial, sans-serif;
  color: #0b1620;
}

.zc-chat[hidden] {
  display: none;
}

.zc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 13px;
  background:
    radial-gradient(280px 130px at 10% 0%, rgba(18, 166, 122, 0.24), transparent 70%),
    #0b1620;
  color: #fff;
}

.zc-head__mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #12a67a;
  color: #0b1620;
  font-size: 18px;
  font-weight: 700;
}

.zc-head__text {
  min-width: 0;
  flex: 1;
}

.zc-head__text strong {
  display: block;
  font-size: 13.5px;
  font-weight: 650;
}

.zc-head__text span {
  display: block;
  margin-top: 1px;
  color: #8ff0cd;
  font-size: 10.5px;
}

.zc-head__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.zc-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 12px 10px;
  overflow-y: auto;
  background:
    radial-gradient(rgba(11, 22, 32, 0.045) 1px, transparent 1px) 0 0 / 18px 18px,
    #f4f6f1;
  scrollbar-width: thin;
}

.zc-msg {
  display: flex;
  gap: 7px;
  align-items: flex-end;
  max-width: 92%;
}

.zc-msg--bot {
  align-self: flex-start;
}

.zc-msg--user {
  align-self: flex-end;
  justify-content: flex-end;
}

.zc-msg__avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 23px;
  height: 23px;
  margin-bottom: 2px;
  border-radius: 50%;
  background: #0b1620;
  color: #8ff0cd;
  font-size: 11px;
  font-weight: 700;
}

.zc-bubble {
  padding: 9px 11px;
  border: 1px solid #dfe5dc;
  border-radius: 13px 13px 13px 4px;
  background: #fff;
  box-shadow: 0 4px 14px -10px rgba(11, 22, 32, 0.25);
  font-size: 12.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.zc-msg--user .zc-bubble {
  border: 0;
  border-radius: 13px 13px 4px 13px;
  background: #12a67a;
  color: #fff;
}

.zc-bubble p {
  margin: 0;
}

.zc-bubble p + p {
  margin-top: 6px;
}

.zc-bubble strong {
  font-weight: 700;
}

.zc-quiet {
  color: #68767d;
  font-size: 11px;
}

.zc-plan {
  margin-top: 2px;
  padding: 11px;
  border: 1px solid #cfe6dc;
  border-radius: 12px;
  background: linear-gradient(180deg, #f1faf6, #fff);
}

.zc-plan__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.zc-plan__top span {
  color: #12a67a;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.zc-plan__top strong {
  font-size: 15px;
}

.zc-plan__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 5px;
}

.zc-plan__price b {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.zc-plan__price span {
  color: #68767d;
  font-size: 11px;
}

.zc-plan__hint {
  margin-top: 2px;
  color: #68767d;
  font-size: 10.5px;
  line-height: 1.4;
}

.zc-plan__lines {
  display: grid;
  gap: 3px;
  margin: 9px 0 0;
  padding: 8px 0 0;
  border-top: 1px dashed #cfe0d7;
  list-style: none;
}

.zc-plan__lines li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: #3c4a50;
  font-size: 10.5px;
}

.zc-plan__lines b {
  flex: 0 0 auto;
  font-weight: 650;
}

.zc-plan__billing {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}

.zc-plan__billing button,
.zc-chip {
  border: 1px solid #cfdbd4;
  border-radius: 999px;
  background: #fff;
  color: #33434a;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 9px;
  cursor: pointer;
}

.zc-plan__billing button.is-active,
.zc-chip.is-active {
  border-color: #12a67a;
  background: #e5f7ee;
  color: #087552;
}

.zc-plan__print {
  margin-top: 9px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0b7a58;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.zc-plan__note {
  margin-top: 7px;
  color: #7b8891;
  font-size: 9.5px;
  line-height: 1.4;
}

.zc-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
  background: #f4f6f1;
}

.zc-foot {
  padding: 9px 12px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid #e0e6dd;
  background: #fff;
}

.zc-input {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 4px 4px 12px;
  border: 1px solid #cfdbd4;
  border-radius: 12px;
  background: #f8faf6;
}

.zc-input input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: #0b1620;
  font-family: inherit;
  font-size: 13px;
}

.zc-input button {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: #12a67a;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.zc-foot__note {
  margin-top: 6px;
  color: #8a979d;
  font-size: 9px;
  line-height: 1.35;
  text-align: center;
}

.zc-lead {
  display: grid;
  gap: 8px;
  margin-top: 2px;
  padding: 11px;
  border: 1px solid #dfe5dc;
  border-radius: 12px;
  background: #fff;
}

.zc-lead__row {
  display: grid;
  gap: 4px;
}

.zc-lead__row--two {
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.zc-lead label {
  display: grid;
  gap: 3px;
  color: #526168;
  font-size: 9.5px;
  font-weight: 600;
}

.zc-lead input {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #d4ded7;
  border-radius: 8px;
  outline: none;
  background: #fbfcf9;
  color: #0b1620;
  font-family: inherit;
  font-size: 12px;
}

.zc-lead input:focus {
  border-color: #12a67a;
  box-shadow: 0 0 0 3px rgba(18, 166, 122, 0.1);
}

.zc-lead__consent {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 6px !important;
  color: #68767d;
  font-size: 9.5px !important;
  line-height: 1.35;
  font-weight: 400 !important;
}

.zc-lead__consent input {
  width: 14px;
  min-height: 14px;
  margin: 1px 0 0;
  accent-color: #12a67a;
}

.zc-lead__consent a {
  color: #0b7a58;
  text-decoration: underline;
}

.zc-lead__submit {
  min-height: 38px;
  border: 0;
  border-radius: 9px;
  background: #12a67a;
  color: #fff;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.zc-lead__submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.zc-lead__back {
  border: 0;
  background: transparent;
  color: #68767d;
  font-family: inherit;
  font-size: 10px;
  text-decoration: underline;
  cursor: pointer;
}

.zc-error {
  margin: 0;
  padding: 7px 8px;
  border-radius: 7px;
  background: #fbeceb;
  color: #a6362c;
  font-size: 10px;
  line-height: 1.4;
}

.zc-success {
  padding: 11px;
  border: 1px solid #bfe4d3;
  border-radius: 12px;
  background: #effaf4;
}

.zc-success strong {
  display: block;
  margin-bottom: 3px;
  color: #087552;
  font-size: 13px;
}

.zc-success p {
  margin: 0;
  color: #526168;
  font-size: 11px;
  line-height: 1.5;
}

.zc-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.zc-success__actions button {
  border: 1px solid #b8d9c9;
  border-radius: 999px;
  padding: 6px 9px;
  background: #fff;
  color: #0b7a58;
  font-family: inherit;
  font-size: 10px;
  font-weight: 650;
  cursor: pointer;
}

.zc-typing {
  display: inline-flex;
  gap: 3px;
  align-items: center;
  min-height: 14px;
}

.zc-typing i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #8a979d;
  animation: zc-blink 1s infinite ease-in-out;
}

.zc-typing i:nth-child(2) { animation-delay: 0.15s; }
.zc-typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes zc-blink {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

@media (max-width: 640px) {
  body.zc-chat-open {
    overflow: hidden;
  }

  .zc-launcher {
    right: 14px;
    bottom: calc(84px + env(safe-area-inset-bottom));
    min-height: 48px;
    padding: 0 14px 0 11px;
    font-size: 12px;
  }

  .zc-chat {
    inset: 0;
    width: 100%;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .zc-head {
    padding-top: calc(14px + env(safe-area-inset-top));
  }

  .zc-foot {
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .zc-launcher,
  .zc-typing i {
    transition: none;
    animation: none;
  }
}
