.ordnt-beta-feedback-trigger {
    position: fixed;
    /* Normal content layer, always BELOW sheets/dialogs. */
    z-index: 1490;
    bottom: calc(18px + env(safe-area-inset-bottom, 0px));
    right: calc(18px + env(safe-area-inset-right, 0px));
    border: 1px solid #dce5f0;
    border-radius: 999px;
    background: #fff;
    color: #19345b;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    padding: 11px 16px;
    box-shadow: 0 4px 18px rgba(15, 38, 71, .15);
    cursor: pointer;
}
.ordnt-beta-feedback-trigger:hover { background: #f1f5fa; }
.ordnt-beta-feedback-trigger[hidden],
.ordnt-beta-feedback-backdrop[hidden] { display: none !important; }
.ordnt-beta-feedback-backdrop {
    position: fixed;
    z-index: 2147483001;
    inset: 0;
    background: rgba(10, 24, 47, .58);
    display: grid;
    place-items: center;
    padding: 16px;
}
.ordnt-beta-feedback-dialog {
    box-sizing: border-box;
    background: #fff;
    color: #162033;
    border-radius: 18px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .2);
    width: min(510px, 100%);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px;
    font: 13px/1.5 inherit;
    font-family: inherit;
}
.ordnt-beta-feedback-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.ordnt-beta-feedback-heading h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 750;
}
.ordnt-beta-feedback-close {
    border: none;
    background: transparent;
    font-size: 28px;
    color: #64748b;
    padding: 0 4px;
}
.ordnt-beta-feedback-intro { color: #607088; margin: 8px 0 18px; }
.ordnt-beta-feedback-label { display: block; font-weight: 650; margin: 14px 0 7px; }
.ordnt-beta-feedback-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ordnt-beta-feedback-option {
    display: flex;
    align-items: center;
    min-height: 40px;
    gap: 8px;
    padding: 9px;
    border: 1px solid #dce5f0;
    border-radius: 10px;
    cursor: pointer;
}
.ordnt-beta-feedback-option input { margin: 0; accent-color: #2563eb; }
.ordnt-beta-feedback-dialog textarea {
    box-sizing: border-box;
    width: 100%;
    padding: 11px;
    min-height: 96px;
    resize: vertical;
    border: 1px solid #dce5f0;
    border-radius: 10px;
    background: #fff;
    color: #162033;
}
.ordnt-beta-feedback-context { color: #64748b; font-size: 11px; margin: 9px 0; overflow-wrap: anywhere; }
.ordnt-beta-feedback-status { min-height: 18px; margin: 6px 0; font-size: 12px; color: #9a3412; }
.ordnt-beta-feedback-status[data-success="true"] { color: #147347; }
.ordnt-beta-feedback-submit {
    display: block;
    width: 100%;
    padding: 12px;
    border: 0;
    border-radius: 10px;
    background: #2563eb;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.ordnt-beta-feedback-submit:disabled { opacity: .6; cursor: wait; }
/* The mobile shell owns the bottom 70px; don't place feedback behind it. */
body.ordnt-mobile-shell-ready .ordnt-beta-feedback-trigger {
    bottom: calc(var(--ordnt-mobile-nav-height, 70px) + 14px + env(safe-area-inset-bottom, 0px));
    right: calc(12px + env(safe-area-inset-right, 0px));
}

@media (max-width: 640px) {
    .ordnt-beta-feedback-trigger { padding: 9px 12px; font-size: 11px; }
    .ordnt-beta-feedback-dialog { padding: 17px; }
    .ordnt-beta-feedback-options { grid-template-columns: 1fr; }
}

.ordnt-beta-feedback-screenshot-field { display:grid; gap:6px; margin-top:14px; }
.ordnt-beta-feedback-screenshot-field small { color:#64748b; font-size:11px; }
.ordnt-beta-feedback-screenshot-button { min-height:40px; border:1px solid #c7d8ef; border-radius:10px; background:#f4f8ff; color:#1456ad; font-weight:700; cursor:pointer; }
.ordnt-beta-feedback-screenshot-preview { display:grid; gap:7px; justify-items:start; padding:9px; border:1px solid #dce5f0; border-radius:10px; }
.ordnt-beta-feedback-screenshot-preview[hidden] { display:none; }
.ordnt-beta-feedback-screenshot-preview img { max-width:100%; max-height:185px; object-fit:contain; border-radius:6px; }
.ordnt-beta-feedback-screenshot-preview button { border:0; color:#b42318; background:transparent; cursor:pointer; }
.ordnt-beta-feedback-crop-layer { position:fixed; inset:0; z-index:2147483002; display:grid; grid-template-rows:auto minmax(0,1fr) auto; gap:10px; padding:14px; background:rgba(9,21,41,.96); color:white; font:600 14px/1.4 inherit; font-family:inherit; }
.ordnt-beta-feedback-crop-heading { text-align:center; align-self:center; }
.ordnt-beta-feedback-crop-stage { position:relative; max-width:100%; max-height:100%; min-height:0; margin:auto; overflow:hidden; touch-action:none; cursor:crosshair; user-select:none; }
.ordnt-beta-feedback-crop-stage > img { max-width:100%; max-height:calc(100dvh - 145px); width:auto; height:auto; display:block; object-fit:contain; pointer-events:none; }
.ordnt-beta-feedback-crop-selection { position:absolute; border:2px solid #60a5fa; box-shadow:0 0 0 9999px rgba(0,0,0,.46); pointer-events:none; }
.ordnt-beta-feedback-crop-actions { display:flex; justify-content:center; gap:12px; }
.ordnt-beta-feedback-crop-actions button { padding:10px 18px; border-radius:9px; border:1px solid #d6e5fa; cursor:pointer; }
.ordnt-beta-feedback-crop-actions button:last-child { border-color:#2563eb; background:#2563eb; color:white; }
.ordnt-beta-feedback-crop-actions button:disabled { opacity:.5; cursor:not-allowed; }

/* Lightweight contextual feedback: keep its route and screenshot workflow. */
.ordnt-beta-feedback-trigger{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:40px}
.ordnt-beta-feedback-icon{font-size:16px;line-height:1}
body.ordnt-account-route .ordnt-beta-feedback-trigger,
body.ordnt-mobile-sheet-open .ordnt-beta-feedback-trigger,
body:has(.ordnt-business-modal-layer) .ordnt-beta-feedback-trigger,
body:has(.ordnt-modal-backdrop[aria-hidden="false"]) .ordnt-beta-feedback-trigger,
body:has(.ordnt-beta-feedback-backdrop:not([hidden])) .ordnt-beta-feedback-trigger{
    display:none!important;
}
@media(max-width:640px){
    .ordnt-beta-feedback-trigger{width:42px;height:42px;min-height:42px;min-width:42px;padding:0;border-radius:50%}
    .ordnt-beta-feedback-label-text{display:none}
    .ordnt-beta-feedback-icon{font-size:20px}
}

/* In the authenticated dashboard the feedback action already lives in the
   sidebar (and in the mobile More menu). Hide only its redundant floating
   launcher; keep the dialog, screenshot capture and standalone POS launcher. */
body:has(#ordntSidebarSendFeedback) .ordnt-beta-feedback-trigger {
    display: none !important;
}
