#alertsView .alerts-telegram {
  display:flex; flex-wrap:wrap; align-items:center; gap:16px;
  margin:14px 12px 4px; padding:18px 20px; position:relative;
  border:1px solid #213332; border-radius:8px;
  background:linear-gradient(105deg,#0d1c1d 0%,#0a1319 43%,#0a1117 100%);
  color:#b8cbd7; font:12px var(--font-ui);
}
#alertsView .alerts-telegram-icon {
  display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px;
  border:1px solid #2b4b45; border-radius:12px;
  background:linear-gradient(145deg,#183a32,#102622); color:#79d8c1;
  box-shadow:inset 0 1px 0 #ffffff05;
}
#alertsView .alerts-telegram-icon svg { width:25px; height:25px; }
#alertsView .alerts-telegram-copy { flex:1; min-width:240px; }
#alertsView .alerts-telegram-heading { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
#alertsView .alerts-telegram h2 { margin:0; color:#e1eae9; font:600 14px/1.4 var(--font-ui); letter-spacing:-.015em; }
#alertsView .alerts-telegram-badge { display:inline-flex; align-items:center; gap:5px; padding:3px 7px; border:1px solid #30403e; border-radius:4px; color:#99aaa9; background:#1b28263d; font:500 10px/1.2 var(--font-ui); white-space:nowrap; }
#alertsView .alerts-telegram-badge::before { content:""; width:4px; height:4px; border-radius:50%; background:currentColor; }
#alertsView .alerts-telegram[data-state=connected] .alerts-telegram-badge { color:#8bd9bd; border-color:#345345; background:#14382a66; }
#alertsView .alerts-telegram[data-state=paused] .alerts-telegram-badge,
#alertsView .alerts-telegram[data-state=pending] .alerts-telegram-badge { color:#d1b87c; border-color:#554c34; background:#332d1f66; }
#alertsView .alerts-telegram[data-state=error] .alerts-telegram-badge { color:#d9a0a5; border-color:#624148; background:#36222866; }
#alertsView .alerts-telegram-copy p { margin:6px 0 0; color:#9aadb6; font:11px/1.55 var(--font-ui); }
#alertsView .alerts-telegram-meta { display:flex; flex-wrap:wrap; align-items:center; gap:14px; margin-top:8px; color:#7b9299; font:10px/1.4 var(--font-ui); }
#alertsView .alerts-telegram-meta>span { display:inline-flex; align-items:center; gap:5px; }
#alertsView .alerts-telegram-meta i { display:inline-block; width:4px; height:4px; border-radius:50%; background:#547e70; }
#alertsView .alerts-telegram-meta a { color:#86afa5; text-decoration:none; }
#alertsView .alerts-telegram-meta a:hover { color:#a9e4d1; }
#alertsView .alerts-telegram-actions { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px; }
#alertsView .alerts-telegram-actions button,
#alertsView .alerts-telegram-actions>a {
  display:inline-flex; align-items:center; justify-content:center; gap:6px;
  min-height:34px; padding:0 12px; box-sizing:border-box;
  border:1px solid #31443f; border-radius:5px; background:#10221e;
  color:#b5d4c9; font:500 11px var(--font-ui); text-decoration:none;
  cursor:pointer; transition:background .15s,border-color .15s,color .15s;
}
#alertsView .alerts-telegram-actions svg { width:15px; height:15px; }
#alertsView .alerts-telegram-actions button:hover,
#alertsView .alerts-telegram-actions>a:hover { background:#17302a; border-color:#4b7061; color:#d1eee3; }
#alertsView .alerts-telegram-actions .alerts-telegram-primary { border-color:#59b39c; background:#62c7ae; color:#071a16; font-weight:650; }
#alertsView .alerts-telegram-actions .alerts-telegram-primary:hover { border-color:#8adfc7; background:#8adfc7; color:#071a16; }
#alertsView .alerts-telegram-actions .alerts-telegram-quiet { border-color:#273732; background:transparent; color:#95ada4; }
#alertsView .alerts-telegram-actions .alerts-telegram-disconnect { width:32px; padding:0; min-height:32px; border-color:transparent; background:transparent; color:#7e9292; }
#alertsView .alerts-telegram-actions .alerts-telegram-disconnect:hover { border-color:#604047; background:#291b20; color:#d6a0a5; }
#alertsView .alerts-telegram button:disabled { opacity:.45; cursor:default; }
#alertsView .alerts-telegram [hidden] { display:none!important; }
#alertsView .alerts-telegram a:focus-visible,
#alertsView .alerts-telegram button:focus-visible { outline:2px solid #71d2b7; outline-offset:3px; }
#alertsView .alerts-telegram-connect { display:flex; flex-wrap:wrap; align-items:center; gap:12px; flex-basis:100%; padding-top:14px; border-top:1px solid #243630; color:#99ada9; font:11px/1.5 var(--font-ui); }
#alertsView .alerts-telegram-connect span { display:inline-flex; align-items:center; gap:7px; }
#alertsView .alerts-telegram-connect b { display:grid; place-items:center; width:18px; height:18px; border:1px solid #314c42; border-radius:50%; color:#9fcbbb; font-size:9px; font-weight:500; }
#alertsView .alerts-telegram-connect i { color:#49675d; font-style:normal; }
#alertsView .alerts-telegram-feedback { flex-basis:100%; margin:0; padding-top:12px; border-top:1px solid #243630; color:#8cd1b9; font:11px/1.5 var(--font-ui); }
#alertsView .alerts-telegram-feedback[data-kind=error] { color:#d6a0a5; }
@media(max-width:900px) {
  #alertsView .alerts-telegram { gap:12px; padding:15px; }
  #alertsView .alerts-telegram-copy { min-width:200px; }
  #alertsView .alerts-telegram-actions { padding-left:56px; flex-basis:100%; justify-content:flex-start; }
}
@media(max-width:520px) {
  #alertsView .alerts-telegram { margin:10px 9px 0; padding:13px; gap:11px; }
  #alertsView .alerts-telegram-icon { flex-basis:36px; width:36px; height:36px; border-radius:10px; align-self:flex-start; }
  #alertsView .alerts-telegram-icon svg { width:21px; height:21px; }
  #alertsView .alerts-telegram-copy { min-width:0; }
  #alertsView .alerts-telegram h2 { font-size:13px; }
  #alertsView .alerts-telegram-actions { padding-left:0; }
  #alertsView .alerts-telegram-actions button,
  #alertsView .alerts-telegram-actions>a { min-height:36px; }
  #alertsView .alerts-telegram-connect { align-items:flex-start; flex-direction:column; gap:9px; }
  #alertsView .alerts-telegram-connect>i { display:none; }
}
@media(prefers-reduced-motion:reduce) {
  #alertsView .alerts-telegram * { transition:none; }
}

/* Telegram shares the compact header controls with alert presets. */
#alertsView .alerts-telegram-control { position:relative; flex:none; }
#alertsView .alerts-telegram-control>summary {
  display:flex; align-items:center; gap:7px; box-sizing:border-box; height:32px;
  padding:0 10px; border:1px solid #263c38; border-radius:6px;
  background:#0b1917; color:#a9c9be; cursor:pointer; list-style:none;
  font:500 11px var(--font-ui); user-select:none;
  transition:background .15s,border-color .15s,color .15s;
}
#alertsView .alerts-telegram-control>summary::-webkit-details-marker { display:none; }
#alertsView .alerts-telegram-control>summary:hover,
#alertsView .alerts-telegram-control[open]>summary { border-color:#456b5c; background:#122720; color:#d0e9df; }
#alertsView .alerts-telegram-control>summary:focus-visible { outline:2px solid #71d2b7; outline-offset:3px; }
#alertsView .alerts-telegram-trigger-icon { width:14px; height:14px; color:#80cbb6; }
#alertsView .alerts-telegram-chevron { margin-left:2px; color:#7f9c91; transition:transform .15s; }
#alertsView .alerts-telegram-control[open] .alerts-telegram-chevron { transform:rotate(180deg); }
#alertsView .alerts-telegram-trigger-dot { width:4px; height:4px; border-radius:50%; background:#667976; }
#alertsView .alerts-telegram-control[data-state=connected] .alerts-telegram-trigger-dot { background:#84d8b4; box-shadow:0 0 5px #84d8b433; }
#alertsView .alerts-telegram-control[data-state=paused] .alerts-telegram-trigger-dot,
#alertsView .alerts-telegram-control[data-state=pending] .alerts-telegram-trigger-dot { background:#c9af75; }
#alertsView .alerts-telegram-control[data-state=error] .alerts-telegram-trigger-dot { background:#d29ba1; }
#alertsView .alerts-telegram-control .alerts-telegram {
  position:absolute; z-index:100; top:calc(100% + 8px); right:0;
  width:342px; max-width:calc(100vw - 32px); box-sizing:border-box;
  display:flex; align-items:flex-start; gap:12px; margin:0; padding:16px;
  border-color:#2a4139; background:linear-gradient(135deg,#101d1c,#0a1218 75%);
  box-shadow:0 16px 36px #0008,inset 0 1px 0 #ffffff03;
}
#alertsView .alerts-telegram-control:not([open]) .alerts-telegram { display:none; }
#alertsView .alerts-telegram-control .alerts-telegram-icon { flex-basis:32px; width:32px; height:32px; border-radius:9px; }
#alertsView .alerts-telegram-control .alerts-telegram-icon svg { width:19px; height:19px; }
#alertsView .alerts-telegram-control .alerts-telegram-copy { min-width:0; }
#alertsView .alerts-telegram-control .alerts-telegram-heading { gap:7px; }
#alertsView .alerts-telegram-control .alerts-telegram h2 { font-size:12px; }
#alertsView .alerts-telegram-control .alerts-telegram-copy p { margin-top:8px; font-size:11px; line-height:1.65; }
#alertsView .alerts-telegram-control .alerts-telegram-meta { gap:8px 12px; margin-top:10px; }
#alertsView .alerts-telegram-control .alerts-telegram-actions { flex-basis:100%; padding:12px 0 0; border-top:1px solid #263932; justify-content:flex-start; }
#alertsView .alerts-telegram-control .alerts-telegram-actions .alerts-telegram-disconnect { margin-left:auto; }
#alertsView .alerts-telegram-control .alerts-telegram-connect { flex-direction:column; align-items:flex-start; gap:9px; }
#alertsView .alerts-telegram-control .alerts-telegram-connect>i { display:none; }
@media(max-width:600px) {
  #alertsView .alerts-telegram-control .alerts-telegram { position:fixed; top:128px; left:12px; right:12px; width:auto; max-width:none; }
}
