/* Telegram Channel Modal - Option 1 Native SaaS */
#tg-channel-dialog {
  width: min(460px, calc(100vw - 32px)) !important;
  max-width: 460px !important;
  border-radius: 20px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  background: linear-gradient(180deg, #161922 0%, #101218 100%) !important;
  padding: 24px 22px 24px !important;
  color: #f0f6fc !important;
  box-shadow: 0 28px 72px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.05), 0 0 40px rgba(0, 119, 255, 0.12) !important;
  margin: auto !important;
  outline: none !important;
}

#tg-channel-dialog[open] {
  animation: tgPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

#tg-channel-dialog::backdrop {
  background: rgba(8, 10, 14, 0.78) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  animation: tgFadeInBackdrop 0.25s ease-out forwards !important;
}

@keyframes tgPopIn {
  0% {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes tgFadeInBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tg-v1-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-family: 'Sora', system-ui, -apple-system, sans-serif;
}

.tg-v1-head {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
}

.tg-v1-title-group {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.tg-v1-icon {
  width: 38px !important;
  height: 38px !important;
  border-radius: 11px !important;
  background: linear-gradient(135deg, rgba(88, 166, 255, 0.22) 0%, rgba(56, 139, 253, 0.08) 100%) !important;
  border: 1px solid rgba(88, 166, 255, 0.35) !important;
  display: grid !important;
  place-items: center !important;
  color: #58a6ff !important;
  box-shadow: 0 0 16px rgba(88, 166, 255, 0.2) !important;
  flex-shrink: 0 !important;
}

.tg-v1-icon svg {
  width: 20px !important;
  height: 20px !important;
  fill: #58a6ff !important;
}

.tg-v1-title {
  font-size: 19px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  margin: 0 !important;
  letter-spacing: -0.01em !important;
}

/* Close button - clean borderless style with focus outline removed */
.tg-v1-close {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid transparent !important;
  outline: none !important;
  box-shadow: none !important;
  color: #8b929e !important;
  font-size: 20px !important;
  line-height: 1 !important;
  display: grid !important;
  place-items: center !important;
  cursor: pointer !important;
  transition: all 0.16s ease !important;
  padding: 0 !important;
}

.tg-v1-close:focus,
.tg-v1-close:focus-visible {
  outline: none !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

.tg-v1-close:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
  transform: rotate(90deg);
}

.tg-v1-desc {
  font-size: 13.5px !important;
  color: #9aa2b1 !important;
  line-height: 1.45 !important;
  margin: 0 !important;
}

.tg-v1-list {
  list-style: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  background: rgba(255, 255, 255, 0.02) !important;
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  border-radius: 13px !important;
  padding: 14px !important;
  margin: 0 !important;
}

.tg-v1-item {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  font-size: 13.5px !important;
  color: #e2e8f0 !important;
  font-weight: 500 !important;
}

.tg-v1-check {
  width: 18px !important;
  height: 18px !important;
  border-radius: 50% !important;
  background: rgba(88, 166, 255, 0.15) !important;
  border: 1px solid rgba(88, 166, 255, 0.35) !important;
  display: grid !important;
  place-items: center !important;
  flex-shrink: 0 !important;
}

.tg-v1-check svg {
  width: 10px !important;
  height: 10px !important;
  stroke: #58a6ff !important;
  stroke-width: 2.6 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
  fill: none !important;
}

.tg-v1-actions {
  display: flex !important;
  gap: 10px !important;
  margin-top: 4px !important;
}

.tg-v1-btn-ghost {
  flex: 1 !important;
  height: 42px !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  outline: none !important;
  box-shadow: none !important;
  color: #8b929e !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  transition: all 0.15s ease !important;
}

.tg-v1-btn-ghost:focus,
.tg-v1-btn-ghost:focus-visible {
  outline: none !important;
}

.tg-v1-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: #ffffff !important;
}

.tg-v1-btn-ghost svg {
  width: 16px !important;
  height: 16px !important;
  stroke: currentColor !important;
  stroke-width: 2 !important;
  fill: none !important;
}

.tg-v1-btn-main {
  flex: 1.5 !important;
  height: 42px !important;
  border-radius: 10px !important;
  background: #0077ff !important;
  border: 1px solid #0088ff !important;
  outline: none !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  text-decoration: none !important;
  box-shadow: 0 4px 16px rgba(0, 119, 255, 0.4) !important;
  transition: all 0.15s ease !important;
}

.tg-v1-btn-main:focus,
.tg-v1-btn-main:focus-visible {
  outline: none !important;
}

.tg-v1-btn-main:hover {
  background: #0088ff !important;
  box-shadow: 0 6px 20px rgba(0, 119, 255, 0.55) !important;
}

.tg-v1-btn-main:active {
  transform: translateY(1px);
}

.tg-v1-btn-main svg.plane {
  width: 16px !important;
  height: 16px !important;
  fill: #ffffff !important;
}

.tg-v1-btn-main svg.arrow {
  width: 14px !important;
  height: 14px !important;
  stroke: #ffffff !important;
  stroke-width: 2.2 !important;
  fill: none !important;
}
