  --primary-color-t: #00A99D;
  --secondary-color-t: #F39C12;
  --dark-blue-t: #2C3E50;
  --light-grey-t: #F8F9FA;
  --text-color-t: #34495E;
  --white-color-t: #FFFFFF;
  --card-radius-t: 18px;
  --card-radius-sm-t: 12px;
  --shadow-1t: 0 8px 28px rgba(2,6,23,0.06);
  --shadow-2t: 0 20px 50px rgba(2,6,23,0.12);
  --muted-t: rgba(52,73,94,0.55);
/* Halyk Pay — всегда поверх всего */
#halyk-pay,
.halyk-pay,
iframe[src*="homebank.kz"],
iframe[src*="epay"] {
  z-index: 2147483647 !important;
}
/* ----------------- Modal backdrop & box ----------------- */
#tariff-modal {
  position: fixed;
  inset: 0;
  display: none;               /* hidden by default; JS toggles .active/.hidden */
  align-items: center;
  justify-content: center;
  background: rgba(11,22,26,0.48);
  z-index: 9999;
  padding: 28px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* IMPORTANT: active MUST win over .hidden */
#tariff-modal.active {
  display: flex !important;
  animation: modalFadeIn .32s ease both;
}
#tariff-modal.hidden { display: none; }

/* modal container */
#tariff-modal .tariffs {
  width: min(1100px, 98vw);
  max-height: 92vh;
  overflow: auto;
  /* fallback gradient first, then color-mix override for supporting browsers */
  background: linear-gradient(180deg, var(--white-color-t), rgba(0,0,0,0.02));
  background: linear-gradient(180deg, var(--white-color-t), color-mix(in srgb, var(--white-color-t) 94%, black 2%));
  border-radius: var(--card-radius-t);
  padding: 34px 36px 28px;
  box-shadow: var(--shadow-2t);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

/* close button (top-right) */
#tariff-modal .close-modal {
  position: absolute;
  right: 18px;
  top: 14px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #5f6b75;
  font-size: 26px;
  cursor: pointer;
}
#tariff-modal .close-modal:hover { color: var(--secondary-color-t); transform: translateY(-2px); }

/* Title */
#tariff-modal .tariffs-title {
  text-align: center;
  font-size: 32px;
  font-weight: 800;
  color: var(--dark-blue-t);
  margin-bottom: 6px;
}
#tariff-modal .tariffs-subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--muted-t);
  margin-bottom: 20px;
}

/* Toggle period pills */
#tariff-modal .tariff-toggle {
  display:flex;
  gap:12px;
  justify-content:center;
  margin-bottom: 16px;
  flex-wrap:wrap;
}
#tariff-modal .toggle-btn{
  padding:8px 18px;
  border-radius: 999px;
  font-weight:700;
  font-size:14px;
  background: #f6f8f8;
  border: 2px solid transparent;
  cursor:pointer;
  color: var(--dark-blue-t);
  transition: transform .16s ease, background .16s ease;
}
#tariff-modal .toggle-btn:hover{ transform: translateY(-3px); }
#tariff-modal .toggle-btn.active{
  background: var(--dark-blue-t);
  color: #fff;
  box-shadow: 0 8px 26px rgba(0,0,0,0.10);
}

/* small badges in toggle */
#tariff-modal .badge-small {
  display:inline-block;
  margin-left:8px;
  padding:4px 8px;
  border-radius: 12px;
  font-size:12px;
  font-weight:700;
  vertical-align: middle;
}
.badge-small { background:#ffb400; color:#fff; }
.badge-small.bonus { background:#1cc88a; }

/* ------------- tariffs grid ------------- */
#tariff-modal .tariff-grid {
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
  margin: 6px auto 12px;
}
@media (max-width: 980px){
  #tariff-modal .tariff-grid { grid-template-columns: 1fr; padding: 0 6px; }
  #tariff-modal .tariffs { padding: 22px; }
}

/* card base */
#tariff-modal .tariff-card {
  background: var(--white-color-t);
  border-radius: 14px;
  padding: 26px 22px;
  box-shadow: var(--shadow-1t);
  display:flex;
  flex-direction: column;
  gap:12px;
  min-height: 300px;
  transition: transform .28s cubic-bezier(.2,.9,.2,1), box-shadow .28s ease;
}
#tariff-modal .tariff-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-2t); }

/* central popular card style (teal) */
#tariff-modal .tariff-card.popular {
  background: linear-gradient(180deg, var(--primary-color-t), rgba(0,0,0,0.06));
  /* override with color-mix when supported */
  background: linear-gradient(180deg, var(--primary-color-t), color-mix(in srgb,var(--primary-color-t) 86%, black 6%));
  color: #fff;
  border: 1px solid rgba(255,255,255,0.06);
  transform: translateY(0);
}
/* highlight for featured (slightly larger) */
#tariff-modal .tariff-card.highlight { transform: scale(1.03); box-shadow: 0 28px 56px rgba(0,0,0,0.16); }

/* name / price */
.tariff-name { font-size:20px; font-weight:800; color: var(--primary-color-t); text-align:left; }
.tariff-card.popular .tariff-name { color: rgba(255,255,255,0.95); text-align:center; }
.tariff-price { font-size:28px; font-weight:900; color: var(--secondary-color-t); margin-top: 6px; }
/* notranslate class on currency number and symbol only */
.price-amount { font-weight:900; font-size:30px; display:inline-block; margin-right:8px; }
.price-amount.notranslate { unicode-bidi: isolate; } /* preserve for translators */
.price-unit { color: #667; font-weight:600; font-size:14px; }

/* in popular card keep white price */
.tariff-card.popular .tariff-price { color: rgba(255,255,255,0.95); }
.tariff-card.popular .price-unit { color: rgba(255,255,255,0.85); }

/* features list */
.tariff-features { list-style:none; padding-left:0; margin-top:8px; display:flex; flex-direction:column; gap:10px; color: #53606a; font-weight:600; }
.tariff-card.popular .tariff-features { color: rgba(255,255,255,0.95); }

/* tick mark style */
.tariff-features li::before {
  content: "✔";
  display:inline-block;
  width:20px;
  color: var(--primary-color-t);
  margin-right:8px;
  font-weight:900;
}
.tariff-card.popular .tariff-features li::before { color: rgba(255,255,255,0.95); }

/* select button */
.tariff-select-btn {
  margin-top:auto;
  padding:12px 18px;
  border-radius: 12px;
  border: none;
  font-weight:800;
  cursor:pointer;
  box-shadow: 0 8px 28px rgba(0,0,0,0.08);
  transition: transform .14s ease, box-shadow .14s ease;
}
.tariff-select-btn:hover { transform: translateY(-3px); }
#tariff-modal .tariff-card.popular .tariff-select-btn { background: #fff; color: var(--primary-color-t); }
#tariff-modal .tariff-card:not(.popular) .tariff-select-btn { background: var(--primary-color-t); color: #fff; }

/* badge (top-right of card) */
#tariff-modal .badge {
  position:absolute;
  top: 14px;
  right: 14px;
  padding:6px 10px;
  border-radius:12px;
  font-weight:800;
  font-size:12px;
  background: var(--secondary-color-t);
  color:#fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
#tariff-modal .tariff-card.popular .badge { background: #ffb347; color:#fff; }

/* note below */
#tariff-modal .tariffs-subtext {
  margin-top: 12px;
  color: var(--muted-t);
  font-size: 13px;
  text-align: center;
  line-height:1.4;
}

/* ------------- Input modal (beautiful input) ------------- */
.tariff-input-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6,12,15,0.44);
  z-index: 10020;
  padding: 20px;
}
/* same override to ensure active is visible even if .hidden exists */
.tariff-input-modal.active { display:flex !important; animation: inputModalIn .28s cubic-bezier(.2,.9,.2,1) both;}

.tariff-input-card {
  width: min(560px, 94vw);
  background: var(--white-color-t);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 26px 48px rgba(2,6,23,0.22);
  display:flex;
  flex-direction:column;
  gap:10px;
  position: relative;
}

.tariff-input-card h3 { margin:0; font-size:18px; color:var(--dark-blue-t); font-weight:800; }
.tariff-input-card .helper { color: var(--muted-t); font-size:13px; margin-top:2px; }

/* safe fallback border, then color-mix override (modern browsers) */
#tariff-domain-input {
  width:100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 2px solid rgba(0,169,157,0.24);
  font-size:15px;
  color: var(--dark-blue-t);
  font-weight:700;
  outline: none;
  box-shadow: 0 8px 28px rgba(0,0,0,0.06);
  transition: border-color .18s ease, box-shadow .18s ease, transform .12s ease;
}
/* override border in browsers that support color-mix */
@supports (color-mix(in srgb, var(--primary-color-t) 24%, #e9eef0 76%)) {
  #tariff-domain-input {
    border: 2px solid color-mix(in srgb, var(--primary-color-t) 24%, #e9eef0 76%);
  }
}

#tariff-domain-input::placeholder { color: rgba(44,62,80,0.34); font-weight:600; }
#tariff-domain-input:focus { border-color: var(--primary-color-t); box-shadow: 0 18px 40px rgba(0,169,157,0.12); transform: translateY(-1px); }

.tariff-input-actions { display:flex; gap:10px; justify-content:flex-end; margin-top:6px; }
.btn-cancel, .btn-confirm {
  padding:10px 14px; border-radius:10px; border:none; cursor:pointer; font-weight:800;
}
.btn-cancel { background:#f2f4f5; color:var(--dark-blue-t); }
.btn-confirm { background:var(--primary-color-t); color:#fff; box-shadow: 0 10px 30px rgba(0,169,157,0.12); }

/* error */
#tariff-input-error { color:#ff4b4b; font-weight:700; font-size:13px; display:block; margin-top:6px; }

/* keyboard focus */
button:focus, input:focus { outline: 3px solid rgba(0,169,157,0.12); outline-offset: 2px; }

/* animations */
@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(8px) scale(.995); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes inputModalIn {
  from { opacity: 0; transform: translateY(12px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* small helpers */
/* keep .hidden utility, but active rules above override it */
.hidden { display:none !important; }
.small-text { font-size:13px; color:var(--muted-t); }