body :is(.sidebar-help, a[href^="mailto:support"]) { cursor: pointer !important; transition: transform .18s ease, filter .18s ease, box-shadow .18s ease; }
body :is(.sidebar-help, a[href^="mailto:support"]):hover { filter: brightness(1.05); transform: translateY(-1px); }
body :is(.sidebar-help, a[href^="mailto:support"]):focus-visible { outline: 3px solid #78aaff; outline-offset: 3px; }
.zenta-support-dialog { width: min(720px, calc(100vw - 32px)); height: min(760px, 86dvh); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 1px solid var(--line, #e2e8f0); border-radius: 22px; color: var(--ink, #172033); background: var(--surface, #fff); box-shadow: 0 28px 90px #10213b52; }
html[data-theme="dark"] body.markets-page .zenta-support-dialog { --surface: var(--panel, #141f2e); --surface-soft: var(--panel2, #101e30); --ink: var(--text, #e5eaf2); color: var(--text, #e5eaf2); background: var(--panel, #141f2e); }
html[data-theme="light"] body.markets-page .zenta-support-dialog { --surface: var(--panel, #fff); --surface-soft: var(--panel2, #f7f9fc); --ink: var(--text, #182438); color: var(--text, #182438); background: var(--panel, #fff); }
.zenta-support-dialog::backdrop { background: #071326b8; backdrop-filter: blur(5px); animation: zenta-support-fade .2s ease both; }
.zenta-support-dialog[open] { animation: zenta-support-pop .24s cubic-bezier(.2,.8,.2,1) both; }
.zenta-support-inner { display: flex; flex-direction: column; gap: 14px; height: 100%; padding: 22px; overflow-y: auto; overscroll-behavior: contain; }
.zenta-support-head, .zenta-support-brand, .zenta-support-actions { display: flex; align-items: center; gap: 12px; }
.zenta-support-head { justify-content: space-between; padding: 17px; margin: -22px -22px 0; color: #fff; background: linear-gradient(120deg, #063b73, #126ce0 70%, #18a6bd); }
.zenta-support-brand { min-width: 0; }
.zenta-support-brand-copy { display: grid; min-width: 0; gap: 4px; }
.zenta-support-brand-icon, .zenta-support-ticket-icon { display: grid; flex: 0 0 auto; place-items: center; }
.zenta-support-brand-icon { width: 46px; height: 46px; border: 0; border-radius: 15px; color: #fff; background: #ffffff20; }
.zenta-support-brand h2 { margin: 0; font-size: clamp(18px, 4vw, 22px); line-height: 1.25; }
.zenta-support-dialog svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.zenta-support-brand-icon svg { width: 24px; height: 24px; }
.zenta-support-close, .zenta-support-ticket, .zenta-support-new, .zenta-support-send { min-height: 42px; padding: 9px 13px; border: 1px solid var(--line, #e2e8f0); border-radius: 11px; color: inherit; background: var(--surface, #fff); cursor: pointer; transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.zenta-support-close { display: grid; width: 40px; min-height: 40px; padding: 0; place-items: center; border-color: #ffffff44; color: #fff; background: #ffffff18; }
.zenta-support-close svg { width: 18px; height: 18px; }
.zenta-support-close:hover, .zenta-support-new:hover, .zenta-support-send:hover, .zenta-support-ticket:hover { transform: translateY(-1px); }
.zenta-support-toolbar { display: flex; flex: 0 0 auto; align-items: center; gap: 9px; min-width: 0; }
.zenta-support-hours { flex: 1 1 auto; min-width: 0; margin: 0; color: var(--muted, #64748b); font-size: 12px; line-height: 1.4; }
.zenta-support-presence { display: inline-flex; width: fit-content; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.zenta-support-presence::before { width: 7px; height: 7px; border-radius: 50%; content: ""; animation: zenta-support-pulse 1.5s ease-out infinite; }
.zenta-support-presence.is-online { color: #b7f7d8; }
.zenta-support-presence.is-online::before { background: #5af0a7; }
.zenta-support-presence.is-offline { color: #ffe0e3; }
.zenta-support-presence.is-offline::before { background: #ff7d89; }
.zenta-support-actions { align-items: stretch; }
.zenta-support-ticket-list { display: flex; flex: 1; min-width: 0; max-height: 132px; overflow: auto; flex-direction: column; gap: 7px; padding: 2px; }
.zenta-support-ticket { display: flex; width: 100%; min-width: 0; align-items: center; gap: 10px; text-align: left; }
.zenta-support-ticket[aria-pressed="true"] { border-color: #0a66ff; background: color-mix(in srgb, #0a66ff 7%, var(--surface, #fff)); box-shadow: inset 3px 0 #0a66ff; }
.zenta-support-ticket-icon { width: 34px; height: 34px; border-radius: 10px; color: #0a66ff; background: color-mix(in srgb, #0a66ff 10%, var(--surface, #fff)); }
.zenta-support-ticket-icon svg { width: 17px; height: 17px; }
.zenta-support-ticket-copy { display: grid; min-width: 0; gap: 3px; }
.zenta-support-ticket-copy strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.zenta-support-ticket-copy small { color: var(--muted, #64748b); font-size: 11px; }
.zenta-support-status::before { display: inline-block; width: 6px; height: 6px; margin: 0 5px 1px 0; border-radius: 50%; background: #159e74; content: ""; }
.zenta-support-status.status-pending::before { background: #e69b23; }
.zenta-support-status.status-closed::before { background: #8993a4; }
.zenta-support-new, .zenta-support-send { display: inline-flex; flex: 0 0 auto; align-items: center; justify-content: center; gap: 8px; border-color: #0a66ff; color: #fff; background: linear-gradient(120deg, #0a66ff, #1555c0); box-shadow: 0 5px 14px #0a66ff2b; }
.zenta-support-new { width: 40px; height: 40px; min-height: 40px; padding: 0; }
.zenta-support-new svg { width: 20px; height: 20px; }
.zenta-support-thread { display: grid; flex: 1; min-height: 110px; overflow: auto; align-content: start; gap: 10px; padding: 14px; border: 1px solid var(--line, #e2e8f0); border-radius: 15px; background: var(--surface-soft, #f4f6fa); }
.zenta-support-message { max-width: min(88%, 520px); padding: 11px 14px; border: 1px solid var(--line, #e2e8f0); border-radius: 15px 15px 15px 5px; background: var(--surface, #fff); white-space: pre-wrap; overflow-wrap: anywhere; box-shadow: 0 4px 12px #10213b0a; }
.zenta-support-message.admin { justify-self: end; border-color: #c8dcff; border-radius: 15px 15px 5px 15px; color: #174581; background: #edf4ff; }
.zenta-support-image-link { display: block; width: fit-content; max-width: 100%; margin-top: 9px; }
.zenta-support-image { display: block; width: auto; max-width: min(100%, 300px); max-height: 260px; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; object-fit: contain; }
.zenta-support-image-previews { display: flex; flex-wrap: wrap; gap: 8px; }
.zenta-support-image-previews figure { display: grid; width: min(150px, calc(33.333% - 6px)); gap: 5px; margin: 0; }
.zenta-support-image-previews figcaption { overflow: hidden; color: var(--muted, #64748b); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.zenta-support-image-previews button { min-height: 32px; border: 1px solid var(--line, #e2e8f0); border-radius: 8px; color: inherit; background: var(--surface, #fff); cursor: pointer; }
.zenta-support-message small { display: block; margin-top: 7px; color: var(--muted, #64748b); font-size: 11px; }
.zenta-support-empty { display: grid; flex: 1; min-height: 90px; place-content: center; justify-items: center; gap: 8px; padding: 14px; border: 1px dashed var(--line, #e2e8f0); border-radius: 15px; color: var(--muted, #64748b); text-align: center; background: var(--surface-soft, #f4f6fa); }
.zenta-support-empty > span { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: #0a66ff; background: color-mix(in srgb, #0a66ff 10%, var(--surface, #fff)); }
.zenta-support-empty p { max-width: 38ch; margin: 0; font-size: 13px; }
.zenta-support-form { display: grid; flex: 0 0 auto; gap: 10px; }
.zenta-support-form label { display: grid; gap: 6px; color: var(--muted, #64748b); font-size: 12px; font-weight: 600; }
.zenta-support-form input, .zenta-support-form textarea { width: 100%; min-height: 42px; padding: 11px 12px; border: 1px solid var(--line, #e2e8f0); border-radius: 11px; color: var(--ink, #172033); background: var(--surface, #fff); }
.zenta-support-form input[type="file"] { padding: 8px; }
.zenta-support-form label small { color: var(--muted, #64748b); font-size: 11px; font-weight: 400; }
.zenta-support-form textarea { min-height: 80px; max-height: 180px; resize: vertical; }
.zenta-support-form input:focus, .zenta-support-form textarea:focus { border-color: #0a66ff; outline: 3px solid #0a66ff24; }
.zenta-support-send { justify-self: end; }
.zenta-support-send:disabled { opacity: .65; cursor: wait; transform: none; }
.zenta-support-error { flex: 0 0 auto; margin: 0; padding: 10px 12px; border-radius: 10px; color: #b42335; background: #fff0f1; }
.zenta-support-muted { margin: 0; color: var(--muted, #64748b); }
html[data-theme="dark"] .zenta-support-message.admin { border-color: #345383; color: #d7e6ff; background: #192d49; }
html[data-theme="dark"] .zenta-support-error { color: #ff9aa4; background: #3a1c29; }
@keyframes zenta-support-pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes zenta-support-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes zenta-support-pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 5px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (max-width: 600px) {
  .zenta-support-dialog { width: calc(100vw - 20px); height: calc(100dvh - 20px); max-height: calc(100dvh - 20px); border-radius: 18px; }
  .zenta-support-inner { gap: 11px; padding: 15px; }
  .zenta-support-head { gap: 8px; padding: 14px; margin: -15px -15px 0; }
  .zenta-support-brand { gap: 9px; }
  .zenta-support-brand-icon { width: 40px; height: 40px; border-radius: 13px; }
  .zenta-support-toolbar { gap: 7px; align-items: flex-start; }
  .zenta-support-hours { font-size: 11px; }
  .zenta-support-new { width: 38px; height: 38px; min-height: 38px; }
  .zenta-support-ticket-list { max-height: 105px; }
  .zenta-support-thread { min-height: 90px; padding: 10px; }
  .zenta-support-message { max-width: 94%; }
  .zenta-support-image-previews figure { width: calc(50% - 4px); }
  .zenta-support-send { width: 100%; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .zenta-support-dialog, .zenta-support-dialog::backdrop, body :is(.sidebar-help, a[href^="mailto:support"]), .zenta-support-close, .zenta-support-ticket, .zenta-support-new, .zenta-support-send, .zenta-support-presence::before { animation: none; transition: none; }
}
.support-icon-button { position: relative; display: inline-grid; width: 36px; height: 36px; min-width: 36px; padding: 0; place-items: center; border: 0 !important; border-radius: 10px; background: transparent; box-shadow: none !important; cursor: pointer; }
.support-icon-button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.support-icon-button.has-unread::after { position: absolute; top: 3px; right: 3px; width: 8px; height: 8px; border: 2px solid var(--surface, #fff); border-radius: 50%; background: #e5484d; content: ""; }
.nav-item.sidebar-help.has-unread::after { position: absolute; top: 50%; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: #e5484d; content: ""; transform: translateY(-50%); }
@media (max-width: 760px) {
  .support-icon-button { width: 31px; height: 31px; min-width: 31px; }
  .mobile-bottom-preferences { justify-content: flex-start; }
  .mobile-bottom-preferences .support-icon-button { margin: 0 0 0 auto; }
  .mobile-bottom-preferences .support-icon-button + button { margin-left: 6px; }
  .mobile-bottom-preferences { padding-right: 4px; }
  .mobile-bottom-preferences > :is(.mobile-language-select, .support-icon-button, .mobile-support-link, #mobile-theme) {
    align-self: center;
    margin-top: 0;
    margin-bottom: 0;
  }
  .mobile-bottom-preferences > :is(.support-icon-button, .mobile-support-link, #mobile-theme) {
    height: 31px;
    min-height: 31px;
  }
  .mobile-bottom-preferences > :is(.support-icon-button, .mobile-support-link) svg {
    width: 20px;
    height: 20px;
  }
  .mobile-bottom-preferences > :is(.support-icon-button, .mobile-support-link) {
    transform: translate(4px, -2px);
    transition: background .18s, color .18s;
  }
  .mobile-bottom-preferences > :is(.support-icon-button, .mobile-support-link):hover,
  .mobile-bottom-preferences > :is(.support-icon-button, .mobile-support-link):focus-visible {
    transform: translate(4px, -2px);
  }
}
