/* OKKwork — popup «Тарифы» (Pill Limits + Mesh Gradient) */

:root {
  --tu-blue: #0658a2;
  --tu-blue-deep: #04467f;
  --tu-green: #6ecf2d;
  --tu-red: #ef5350;
  --tu-bg: #0f1c2e;
  --tu-font: "Rubik-Medium", "Rubik-SemiBold", Rubik, sans-serif;
}

.tu-overlay {
  --tu-pad: 20px;
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--tu-pad);
  background: rgba(4, 10, 20, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: tu-fade-in 0.28s ease;
}

@keyframes tu-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tu-rise {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.tu-dialog {
  width: min(1488px, calc(100vw - 40px));
  max-height: calc(100vh - 40px);
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  background: var(--tu-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 32px 90px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  animation: tu-rise 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}

.tu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background:
    radial-gradient(circle at 90% 0%, rgba(6, 88, 162, 0.35), transparent 55%),
    transparent;
  flex-shrink: 0;
}

.tu-header__title {
  font-family: "Rubik-SemiBold", var(--tu-font);
  font-size: clamp(20px, 2vw, 24px);
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.01em;
}

.tu-header__sub {
  margin-top: 3px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.35;
}

.tu-close {
  appearance: none;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}

.tu-close:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  transform: scale(1.04);
}

.tu-body {
  padding: 24px 22px 28px;
  overflow: auto;
  flex: 1 1 auto;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(6, 88, 162, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 50% at 95% 100%, rgba(110, 207, 45, 0.06), transparent 45%),
    var(--tu-bg);
}

.tu-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
  padding-top: 14px;
}

.tu-card-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 480px;
}

.tu-card-wrap--popular {
  z-index: 1;
}

.tu-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 16px 16px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  overflow: hidden;
  background: var(--tu-bg);
  font-family: var(--tu-font);
  min-height: 480px;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease;
  isolation: isolate;
}

.tu-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0.58;
  z-index: 0;
  pointer-events: none;
}

.tu-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 35%, rgba(0,0,0,0.12) 100%);
}

.tu-card[data-plan="free"]::before {
  background:
    radial-gradient(circle at 30% 18%, #0658a2, transparent 58%),
    radial-gradient(circle at 82% 82%, #3d5a80, transparent 48%);
}

.tu-card[data-plan="basic"]::before {
  background:
    radial-gradient(circle at 22% 28%, #0a6bc4, transparent 52%),
    radial-gradient(circle at 72% 72%, #0658a2, transparent 48%);
}

.tu-card[data-plan="extended"]::before {
  background:
    radial-gradient(circle at 24% 22%, #6ecf2d, transparent 42%),
    radial-gradient(circle at 76% 76%, #0658a2, transparent 52%);
}

.tu-card[data-plan="corporate"]::before {
  background:
    radial-gradient(circle at 28% 38%, #0780df, transparent 48%),
    radial-gradient(circle at 82% 18%, #04467f, transparent 42%);
}

.tu-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.tu-card--popular {
  border-color: rgba(110, 207, 45, 0.45);
  box-shadow:
    0 0 36px rgba(110, 207, 45, 0.12),
    0 16px 40px rgba(0, 0, 0, 0.3);
}

.tu-card--popular:hover {
  box-shadow:
    0 0 44px rgba(110, 207, 45, 0.18),
    0 20px 48px rgba(0, 0, 0, 0.35);
}

.tu-card__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  width: 100%;
}

.tu-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, #9ad94a 0%, var(--tu-green) 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 2;
  box-shadow: 0 6px 18px rgba(110, 207, 45, 0.4);
}

.tu-title {
  font-family: "Rubik-SemiBold", var(--tu-font);
  font-size: clamp(20px, 1.7vw, 26px);
  font-weight: 600;
  text-align: center;
  color: #fff;
}

.tu-pricing {
  margin-top: 16px;
  text-align: center;
}

.tu-price {
  font-family: "Rubik-SemiBold", var(--tu-font);
  font-size: clamp(28px, 2.2vw, 36px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.25);
}

.tu-sub {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.3;
  text-align: center;
  color: rgba(255, 255, 255, 0.68);
  white-space: nowrap;
}

.tu-limits {
  width: 100%;
  margin-top: 16px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tu-limits li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.94);
  text-align: left;
  white-space: nowrap;
}

.tu-limits li > span:last-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tu-pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.tu-pill-icon svg {
  width: 15px;
  height: 15px;
}

.tu-features {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  list-style: none;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.96);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.tu-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 26px;
  white-space: nowrap;
}

.tu-features li + li {
  margin-top: 4px;
}

.tu-dot {
  width: 9px;
  height: 9px;
  min-width: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.tu-dot--yes {
  background: var(--tu-green);
  box-shadow: 0 0 10px rgba(110, 207, 45, 0.65);
}

.tu-dot--no {
  background: var(--tu-red);
  box-shadow: 0 0 8px rgba(239, 83, 80, 0.5);
}

.tu-dot--limited {
  background: #1d71d7;
  box-shadow: 0 0 10px rgba(29, 113, 215, 0.55);
}

.tu-actions {
  width: 100%;
  margin-top: auto;
  padding-top: 16px;
}

.tu-btn {
  appearance: none;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 13px 20px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--tu-blue-deep);
  font-family: var(--tu-font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.tu-btn:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow:
    0 10px 28px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.tu-btn:active {
  transform: translateY(0);
}

.tu-card--popular .tu-btn {
  background: linear-gradient(135deg, #fff 0%, #f0fdf4 100%);
  color: var(--tu-blue-deep);
  box-shadow:
    0 6px 20px rgba(110, 207, 45, 0.2),
    0 0 0 1px rgba(110, 207, 45, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

.tu-card--popular .tu-btn:hover {
  box-shadow:
    0 10px 28px rgba(110, 207, 45, 0.28),
    0 0 0 1px rgba(110, 207, 45, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

@media (max-width: 1200px) {
  .tu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tu-card-wrap,
  .tu-card {
    min-height: 0;
  }
}

@media (max-width: 640px) {
  .tu-overlay {
    padding: 12px;
  }

  .tu-body {
    padding: 18px 14px 22px;
  }

  .tu-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .tu-header__sub {
    display: none;
  }

  .tu-limits li {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tu-overlay,
  .tu-dialog,
  .tu-card:hover,
  .tu-btn:hover {
    animation: none;
    transform: none;
  }
}
