/* The existing scroll-to-top control and feedback share a single fixed stack. */
html.tr-feedback-ready #site-page-actions {
    position: fixed; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom));
    display: flex; flex-direction: column; align-items: flex-end; gap: 10px; z-index: 10;
    max-width: calc(100% - 32px); pointer-events: none;
}
html.tr-feedback-ready #site-page-actions > button { pointer-events: auto; }
html.tr-feedback-ready #buttonToTop { position: static; min-width: 44px; min-height: 44px; }
.tr-feedback-trigger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 16px; border: 1px solid #a9c5d8; border-radius: 24px; background: #fff; color: #214b69; box-shadow: 0 3px 14px #152d4b1a; font: 500 14px/1.3 Roboto, Arial, sans-serif; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.tr-feedback-trigger[hidden] { display: none; }
.tr-feedback-trigger svg { width: 19px; height: 19px; flex-shrink: 0; }
.tr-feedback-trigger:hover { background: #edf6fc; border-color: #6e9fbe; }
.tr-feedback-inline { margin-block: 24px 0; box-shadow: none; }
.tr-feedback-dialog { box-sizing: border-box; width: min(460px, calc(100% - 32px)); max-width: none; max-height: calc(100dvh - 48px); margin: auto; padding: 26px; border: 1px solid #dbe5ed; border-radius: 18px; background: #fff; box-shadow: 0 24px 100px #152d4b40; overflow-y: auto; overscroll-behavior: contain; color: #192e3e; font: 400 15px/1.5 Roboto, Arial, sans-serif; text-align: start; }
.tr-feedback-dialog * { box-sizing: border-box; }
.tr-feedback-dialog:not([open]), .tr-feedback-dialog [hidden] { display: none !important; }
.tr-feedback-dialog::backdrop { background: #10253799; backdrop-filter: blur(3px); }
html.tr-feedback-open { overflow: hidden; }
.tr-feedback-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.tr-feedback-heading h2 { margin: 0; font-size: 23px; line-height: 1.3; }
.tr-feedback-heading p { margin: 8px 0 18px; font-size: 14px; color: #536977; }
.tr-feedback-close { display: grid; place-items: center; flex-shrink: 0; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 9px; background: #f0f4f7; color: #395468; font: 400 28px/1 Arial, sans-serif; cursor: pointer; }
#site-feedback-form label { display: block; margin: 16px 0 6px; font-weight: 500; }
#site-feedback-form select, #site-feedback-form textarea, #site-feedback-form input { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid #afc5d5; border-radius: 8px; background: #fff; color: #192e3e; font: inherit; font-size: 16px; }
#site-feedback-form textarea { resize: vertical; min-height: 108px; max-height: 40dvh; }
.tr-feedback-hint { margin: 5px 0 0; color: #536977; font-size: 13px; }
.tr-feedback-privacy { margin: 18px 0; color: #536977; font-size: 13px; }
.tr-feedback-submit, .tr-feedback-retry { min-height: 44px; padding: 11px 18px; border: 1px solid #176caa; border-radius: 9px; background: #176caa; color: #fff; font: 500 15px/1.4 Roboto, Arial, sans-serif; cursor: pointer; }
.tr-feedback-submit { width: 100%; }
.tr-feedback-submit:hover:not(:disabled), .tr-feedback-retry:hover { background: #115787; }
.tr-feedback-submit:disabled { opacity: .6; cursor: wait; }
#site-feedback-status, #site-feedback-error { margin: 12px 0; font-size: 14px; }
#site-feedback-status:empty, #site-feedback-error:empty { display: none; }
#site-feedback-status { color: #214b69; }
#site-feedback-error { color: #a42626; }
.tr-feedback-dialog[data-sent] #site-feedback-status { padding: 16px; border-radius: 9px; background: #eaf7ef; color: #20633c; }
.tr-feedback-trigger:focus-visible, #site-page-actions #buttonToTop:focus-visible, .tr-feedback-dialog :focus-visible { outline: 3px solid #368dc8; outline-offset: 3px; }
@media (max-width: 600px) {
    html.tr-feedback-ready #site-page-actions { right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); gap: 8px; }
    #site-feedback-trigger { padding: 9px 13px; }
    .tr-feedback-dialog { width: 100%; margin: auto 0 0; max-height: calc(100dvh - 12px); padding: 22px 18px max(22px, env(safe-area-inset-bottom)); border-radius: 18px 18px 0 0; }
    .tr-feedback-heading h2 { font-size: 22px; }
}
@media (prefers-reduced-motion: no-preference) {
    .tr-feedback-dialog[open] { animation: tr-feedback-appear .15s ease-out; }
    @keyframes tr-feedback-appear { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
