/* TeleDK v1.0.115 — global icon visibility/recovery
   Visual layer only: no click/submit/business logic changes. */

:root{
  --teledk-icon-fallback-fg:#a99bea;
  --teledk-icon-fallback-bg:#111827;
  --teledk-icon-fallback-border:#344259;
}

/* Prevent legacy CSS from collapsing the actual Lucide SVG itself. */
svg.lucide-icon{
  display:inline-block!important;
  visibility:visible!important;
  opacity:1!important;
  flex:0 0 auto;
  min-width:12px;
  min-height:12px;
  overflow:visible;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  vertical-align:-.18em;
}

/* The recovery runtime inlines the symbol paths when possible. */
svg.lucide-icon[data-teledk-icon-inline="1"]{
  shape-rendering:geometricPrecision;
}

/* Common icon-only wrappers should never make their SVG 0×0. */
:where(
  .admin-nav-icon,
  .site-settings-summary-icon,
  .telegram-bot-module-icon,
  .telegram-bot-connection-icon,
  .fault-bot-avatar,
  .fault-chat-type,
  .dashboard-metric-icon,
  .queue-mark,
  .icon-only-lucide
) > svg.lucide-icon{
  width:18px!important;
  height:18px!important;
  min-width:18px!important;
  min-height:18px!important;
}

/* Brand/logo visual fallback.
   It is activated only by the recovery runtime when the image fails or is
   confirmed fully transparent. Valid uploaded brand artwork is untouched. */
:where(
  .brand-mark,
  .td-global-brand-mark,
  .portal-logo,
  .brand-logo,
  .site-logo,
  .app-logo
).teledk-brand-icon-fallback{
  position:relative;
  display:inline-grid!important;
  place-items:center!important;
  overflow:hidden;
  background:var(--teledk-icon-fallback-bg)!important;
  border-color:var(--teledk-icon-fallback-border)!important;
}

:where(
  .brand-mark,
  .td-global-brand-mark,
  .portal-logo,
  .brand-logo,
  .site-logo,
  .app-logo
).teledk-brand-icon-fallback::before{
  content:attr(data-teledk-brand-initial);
  position:absolute;
  inset:0;
  z-index:1;
  display:grid;
  place-items:center;
  color:var(--teledk-icon-fallback-fg);
  font:900 16px/1 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  letter-spacing:0;
  text-transform:uppercase;
}

:where(
  .brand-mark,
  .td-global-brand-mark,
  .portal-logo,
  .brand-logo,
  .site-logo,
  .app-logo
).teledk-brand-icon-fallback > img{
  opacity:0!important;
  visibility:hidden!important;
}

/* Keep icons visible in dark buttons/cards even if an old rule clears SVG color. */
:where(button,a,[role="button"]) > svg.lucide-icon,
:where(button,a,[role="button"]) svg.lucide-icon{
  color:inherit;
  pointer-events:none;
}

@media(max-width:760px){
  svg.lucide-icon{stroke-width:2.1}
}
