/*
 * dollarisho.com/blog — the Telegram support chooser's styles (assets/js/tg-support-dialog.js), a copy of the
 * storefront's web/src/styles/support-dialog.css plus the reset block at the end (the blog theme styles bare
 * h2/ul/li/button/a). Keep the two in step.
 *
 * The Telegram support chooser (components/support/SupportDialog.tsx). The site's own tokens: brand navy
 * #19144B, ink #171233, muted #6A6588, hairline #E4E1EF, soft fill #EBE9F5 / #F6F5FB, Telegram blue on the
 * contact page's tint.
 */
.dstg-lock { overflow: hidden; }

.dstg {
  padding: 0; border: 0; margin: auto;
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  background: transparent; color: #171233;
  font-family: IRANSansX, Vazirmatn, system-ui, sans-serif;
  overflow: visible;
}
.dstg::backdrop { background: rgba(15, 11, 54, .55); backdrop-filter: blur(2px); }
.dstg[open] { animation: dstgIn .22s cubic-bezier(.22, 1, .36, 1); }
.dstg[open]::backdrop { animation: dstgFade .22s ease-out; }
/* Without showModal() (very old browsers) the open dialog is laid over the page by hand. */
.dstg.dstg--manual[open] { position: fixed; inset: 0; z-index: 2147483000; height: fit-content; box-shadow: 0 0 0 100vmax rgba(15, 11, 54, .55); }

.dstg__panel {
  background: #ffffff; border-radius: 22px;
  box-shadow: 0 2px 6px rgba(25, 20, 75, .08), 0 30px 60px -24px rgba(25, 20, 75, .45);
  padding: 20px 18px 16px;
  max-height: calc(100dvh - 24px); overflow: auto; box-sizing: border-box;
}
.dstg__head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.dstg__title {
  flex: 1; margin: 0; font-size: 16.5px; line-height: 1.7; font-weight: 800; color: #19144B;
}
.dstg__x {
  flex: none; width: 38px; height: 38px; padding: 0; margin: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #E7E4F1; border-radius: 12px; background: #F6F5FB; color: #19144B; cursor: pointer;
  transition: background .2s, color .2s;
}
.dstg__x:hover { background: #EBE9F5; color: #0F0B36; }

.dstg__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dstg a.dstg__opt {
  display: flex; align-items: center; gap: 12px;
  min-height: 64px; padding: 12px 14px; box-sizing: border-box;
  border: 1px solid #E4E1EF; border-radius: 16px; background: #ffffff;
  color: #171233; text-decoration: none;
  transition: background .2s, border-color .2s, transform .2s cubic-bezier(.22, 1, .36, 1);
}
.dstg a.dstg__opt:hover { background: #EBE9F5; border-color: #D6D2EA; color: #0F0B36; }
.dstg a.dstg__opt:active { transform: scale(.99); }
.dstg__ico {
  flex: none; width: 42px; height: 42px; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(38, 165, 228, .14); color: #1F9BDA;
}
.dstg__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.dstg__label { font-size: 14px; line-height: 1.75; font-weight: 700; }
.dstg__handle {
  align-self: flex-end; font-size: 12px; font-weight: 500; color: #6A6588;
  direction: ltr; unicode-bidi: isolate; overflow-wrap: anywhere;
}
.dstg__foot { margin-top: 14px; display: flex; justify-content: center; }
.dstg__close {
  font: inherit; font-size: 13.5px; font-weight: 700; color: #19144B; cursor: pointer;
  padding: 9px 26px; border-radius: 12px; border: 1px solid #E7E4F1; background: #F6F5FB;
  transition: background .2s;
}
.dstg__close:hover { background: #EBE9F5; }

.dstg :focus-visible { outline: 2px solid #19144B; outline-offset: 2px; }
.dstg a.dstg__opt:focus-visible { outline-offset: 1px; }

@media (max-width: 400px) {
  .dstg__panel { padding: 16px 14px 14px; border-radius: 18px; }
  .dstg__title { font-size: 15.5px; }
  .dstg a.dstg__opt { padding: 11px 12px; gap: 10px; }
  .dstg__ico { width: 38px; height: 38px; }
  .dstg__label { font-size: 13.5px; }
}

@keyframes dstgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes dstgFade { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .dstg[open], .dstg[open]::backdrop { animation: none; }
  .dstg a.dstg__opt, .dstg__x, .dstg__close { transition: none; }
}

/* Blog only: the theme's own element styles must not reach into the dialog. */
.dstg *, .dstg *::before, .dstg *::after { box-sizing: border-box; letter-spacing: normal; }
.dstg h2.dstg__title { font-family: IRANSansX, Vazirmatn, system-ui, sans-serif; text-align: right; }
.dstg ul.dstg__list, .dstg ul.dstg__list li { margin: 0; padding: 0; list-style: none; }
.dstg ul.dstg__list li::before, .dstg ul.dstg__list li::marker { content: none; }
.dstg a.dstg__opt, .dstg a.dstg__opt:hover { text-decoration: none; box-shadow: none; }
.dstg button { line-height: 1.4; text-transform: none; min-height: 0; box-shadow: none; }
.dstg svg { display: block; }
