/* Global Contact Support owns its complete presentation; no style.css buttons.
   Shared semantic roles also cover retained non-workspace consumers. */
.support-contact-fab,.support-contact-modal {
    --sc-ink: var(--text-primary, #262728);
    --sc-muted: var(--text-secondary, #606265);
    --sc-surface: var(--bg-primary, #fff);
    --sc-soft: var(--app-surface-control, #f6f6f6);
    --sc-line: var(--app-border-soft, #e6e7e8);
    --sc-border: var(--app-border-default, #d9dbde);
    --sc-accent: var(--app-accent, #443ab8);
    --sc-accent-text: var(--app-accent-text, var(--sc-accent));
    color: var(--sc-ink);
    font: 400 14px/1.5 'TSB Inter', Inter, sans-serif;
    color-scheme: var(--app-native-color-scheme, light);
}
.support-contact-fab,.support-contact-modal * { box-sizing: border-box; }
.support-contact-modal [hidden] { display: none !important; }
body.support-contact-open { overflow: hidden; }
.support-contact-fab {
    position: fixed;
    right: calc(18px + env(safe-area-inset-right));
    bottom: calc(18px + env(safe-area-inset-bottom));
    z-index: 130;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--sc-border);
    border-radius: 6px;
    background: var(--sc-surface);
    color: var(--sc-muted);
    font-weight: var(--app-action-font-weight, 600);
    text-decoration: none;
    cursor: pointer;
}
.support-contact-fab:hover { background: var(--sc-soft); color: var(--sc-ink); }
.support-contact-fab :is(svg,i) { width: 18px; height: 18px; flex: none; }
.support-contact-modal[hidden] { display: none; }
.support-contact-modal {
    position: fixed;
    inset: 0;
    z-index: 1420;
    display: grid;
    place-items: center;
    padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease-out;
}
.support-contact-modal.visible { opacity: 1; pointer-events: auto; }
.support-contact-backdrop {
    position: absolute;
    inset: 0;
    background: var(--app-modal-backdrop, rgb(0 0 0 / .56));
    backdrop-filter: var(--app-modal-backdrop-filter, blur(4px));
}
.support-contact-dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    width: min(560px, 100%);
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    overflow: hidden;
    border: 1px solid var(--sc-border);
    border-radius: 10px;
    background: var(--sc-surface);
    box-shadow: 0 24px 80px rgb(0 0 0 / .20);
}
.support-contact-head {
    display: flex;
    flex: none;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--sc-line);
}
.support-contact-head > div { min-width: 0; }
.support-contact-kicker { display: block; margin-bottom: 4px; color: var(--sc-muted); font-size: 12px; font-weight: 500; line-height: 18px; }
.support-contact-head h2 { margin: 0; color: var(--sc-ink); font-size: 24px; font-weight: 600; letter-spacing: -.03em; line-height: 30px; }
.support-contact-head p { margin: 6px 0 0; max-width: 440px; text-wrap: pretty; color: var(--sc-muted); font-size: 14px; line-height: 21px; }
.support-contact-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 44px;
    height: 44px;
    margin: -4px -8px 0 0;
    padding: 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--sc-muted);
    cursor: pointer;
}
.support-contact-close:hover { background: var(--sc-soft); color: var(--sc-ink); }
.support-contact-modal :is(svg,i[data-lucide]) { width: 18px; height: 18px; flex: none; stroke-width: 1.7; }
.support-contact-form { display: flex; flex-direction: column; min-height: 0; margin: 0; padding: 0; overflow: hidden; }
.support-contact-body { display: grid; gap: 16px; min-height: 0; padding: 20px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.support-contact-field { display: grid; gap: 6px; min-width: 0; }
.support-contact-field > span,.support-contact-upload strong { color: var(--sc-ink); font-size: 14px; font-weight: 500; line-height: 21px; }
.support-contact-modal :is(button,select,textarea) { font-family: inherit; }
.support-contact-field :is(select,textarea) {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid var(--sc-border);
    border-radius: 6px;
    background: var(--sc-surface);
    color: var(--sc-ink);
    font-size: 14px;
    font-weight: 400;
    line-height: 21px;
}
.support-contact-field:has(select) { position: relative; }
.support-contact-field:has(select)::after {
    content: '';
    position: absolute;
    right: 12px;
    bottom: 14px;
    width: 16px;
    height: 16px;
    pointer-events: none;
    background: var(--sc-muted);
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.support-contact-field select { min-height: 44px; -webkit-appearance: none; appearance: none; padding-right: 40px; font-weight: var(--app-choice-font-weight, 500); }
.support-contact-field textarea { min-height: 126px; resize: vertical; }
.support-contact-field textarea::placeholder { color: var(--sc-muted); opacity: 1; }
.support-contact-modal :is(button,a,select,textarea):focus-visible,.support-contact-fab:focus-visible { outline: 2px solid var(--sc-accent-text); outline-offset: 3px; }
.support-contact-field :is(select,textarea):focus-visible { outline-offset: -1px; }
.support-contact-upload { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 72px; padding: 12px; border: 1px dashed var(--sc-border); border-radius: 6px; background: var(--sc-soft); cursor: pointer; }
.support-contact-upload > :is(svg,i) { color: var(--sc-muted); }
.support-contact-upload span { display: grid; gap: 4px; min-width: 0; }
.support-contact-upload small { color: var(--sc-muted); font-size: 12px; line-height: 19px; }
.support-contact-upload input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.support-contact-upload:focus-within { outline: 2px solid var(--sc-accent-text); outline-offset: 3px; }
.support-contact-files { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.support-contact-files span { display: block; max-width: 100%; padding: 5px 8px; border: 1px solid var(--sc-line); border-radius: 6px; background: var(--sc-soft); color: var(--sc-muted); font-size: 12px; line-height: 19px; overflow-wrap: anywhere; }
.support-contact-feedback { flex: none; padding: 12px 24px; margin: 0; color: var(--sc-muted); font-size: 13px; line-height: 20px; overflow-wrap: anywhere; }
.support-contact-feedback:empty { display: none; }
.support-contact-feedback:focus { outline: none; }
.support-contact-feedback:not(:empty) + .support-contact-foot { border-top-color: transparent; }
.support-contact-feedback.is-success { color: var(--app-positive-text, #2f7d54); }
.support-contact-feedback.is-error { color: var(--app-negative-text, #bf2d23); }
.support-contact-foot { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--sc-line); }
.support-contact-mail { display: inline-flex; align-items: center; min-height: 44px; color: var(--sc-muted); font-size: 14px; font-weight: var(--app-action-font-weight, 600); text-decoration: none; }
.support-contact-mail:hover { color: var(--sc-ink); text-decoration: underline; text-underline-offset: .18em; }
.support-contact-foot .support-contact-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid var(--sc-accent);
    border-radius: 6px;
    background: var(--sc-accent);
    color: var(--user-action-ink, #fff);
    font-size: 14px;
    font-weight: var(--app-action-font-weight, 600);
    line-height: 20px;
    box-shadow: none;
    cursor: pointer;
}
.support-contact-foot .support-contact-submit:hover:not(:disabled) { background: color-mix(in srgb, var(--sc-accent) 92%, black); }
.support-contact-submit-labels { display: grid; }
.support-contact-submit-labels > span { grid-area: 1 / 1; }
.support-contact-submit-labels > [aria-hidden] { visibility: hidden; }
.support-contact-submit[aria-busy=true] .support-contact-submit-labels > span { visibility: hidden; }
.support-contact-submit[aria-busy=true] .support-contact-submit-labels > [aria-hidden] { visibility: visible; }
.support-contact-modal :disabled { opacity: .55; cursor: not-allowed; }
.support-contact-upload input:disabled { opacity: 0; }
.support-contact-upload:has(input:disabled) { opacity: .55; cursor: not-allowed; }
@media(max-width:767px) { body.has-sidebar .support-contact-fab { display: none; } }
@media(max-width:560px) {
    .support-contact-head { padding: 16px; gap: 8px; }
    .support-contact-body { padding: 16px; }
    .support-contact-foot { padding: 12px 16px; gap: 8px; }
    .support-contact-feedback { padding: 12px 16px; }
    .support-contact-head h2 { font-size: 22px; line-height: 28px; }
    .support-contact-foot .support-contact-submit { padding-inline: 10px; gap: 6px; }
}
@media(max-width:480px) { .support-contact-fab { width: 44px; padding: 0; } .support-contact-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; } }
@media(prefers-reduced-motion:reduce) { .support-contact-modal { transition: none; } }
html[data-reduce-motion=true] .support-contact-modal { transition: none; }


/* The message's own error under it, the app's form error (not the browser's bubble; Igor 19 Nov «Да, своя»). */
.support-contact-dialog .support-contact-field .support-contact-field-error{display:block;font-weight:400;margin-top:6px;color:var(--ui-loss,#c4342d);font-size:var(--ui-type-caption-size,12px);line-height:var(--ui-type-caption-leading,18px)}
.support-contact-dialog .support-contact-field .support-contact-field-error[hidden]{display:none}
.support-contact-field textarea[aria-invalid=true]{border-color:var(--ui-loss,#c4342d)}
