/* One button style everywhere */

/* ===================================================================================================
   work168 — ONE button style everywhere (Add, Save, Update, Edit, Delete, Cancel, Close, Copy Info …)
   Every action button: a visible outline, a background, the same corners, height, padding and type, and
   hover / keyboard-focus / pressed / disabled states, in light and dark. Copy-to-clipboard TEXT (Load #,
   RC #, phone numbers, broker names) is not a button style and is not touched here.
   =================================================================================================== */
:root { --bt-h: 36px; --bt-h-sm: 30px; --bt-r: 15px; --bt-line: #c5ccd6; --bt-line-h: #aab3c0; --bt-bg2: #ffffff; --bt-bg2-h: #f1f3f6; --bt-bg2-a: #e6e9ee; --bt-tx: #16181d;
        --bt-pri: #2d5aa0; --bt-pri-h: #244b87; --bt-pri-a: #1d3d6f; --bt-on: #ffffff;
        --bt-dan: #c62f2f; --bt-dan-bg: #fff6f6; --bt-dan-bg-h: #fdeaea; --bt-dan-line: #ecb3b3; --bt-ring: rgba(45, 90, 160, .38); }
:root[data-theme="dark"] { --bt-line: #464a53; --bt-line-h: #5b606b; --bt-bg2: #26282d; --bt-bg2-h: #2f3238; --bt-bg2-a: #373a41; --bt-tx: #eceef1;
        --bt-pri: #4a6daa; --bt-pri-h: #587cbb; --bt-pri-a: #3e5e95; --bt-on: #ffffff;
        --bt-dan: #f28b8b; --bt-dan-bg: rgba(242, 139, 139, .07); --bt-dan-bg-h: rgba(242, 139, 139, .14); --bt-dan-line: rgba(242, 139, 139, .45); --bt-ring: rgba(122, 168, 255, .5); }
/* base = secondary (Cancel, Copy Info, Update, Export …) */
html body .btn:not(#_), html body .back-btn:not(#_), html body .nx-back:not(#_) {
    align-items: center; justify-content: center; gap: 7px; box-sizing: border-box;
    height: var(--bt-h); min-height: var(--bt-h); padding: 0 14px; border-radius: var(--bt-r) !important;
    border: 1px solid var(--bt-line) !important; background: var(--bt-bg2) !important; background-image: none !important; color: var(--bt-tx) !important;
    font-family: var(--font); font-size: 13px; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none; text-decoration: none; white-space: nowrap;
    box-shadow: 0 1px 1.5px rgba(16, 24, 40, .06) !important; filter: none !important; opacity: 1; cursor: pointer; user-select: none; -webkit-user-select: none;
    transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease, transform .06s ease; }
html body .btn:not(#_) .ic, html body .back-btn:not(#_) .ic, html body .nx-back:not(#_) .ic { font-size: 15px; opacity: .9; color: inherit; }
html body .btn:not(#_):hover:not(:disabled), html body .back-btn:not(#_):hover, html body .nx-back:not(#_):hover { background: var(--bt-bg2-h) !important; border-color: var(--bt-line-h) !important; }
html body .btn:not(#_):active:not(:disabled), html body .back-btn:not(#_):active, html body .nx-back:not(#_):active { background: var(--bt-bg2-a) !important; transform: translateY(1px); box-shadow: none !important; }
html body .btn:not(#_):focus-visible, html body .back-btn:not(#_):focus-visible, html body .nx-back:not(#_):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bt-ring) !important; }
/* primary (Save, Create, Edit Load, Add Load, Sign In, OK …) */
html body .btn:not(#_):not(.btn-outline):not(.btn-danger):not(.icon-btn) { background: var(--bt-pri) !important; border-color: var(--bt-pri) !important; color: var(--bt-on) !important; }
html body .btn:not(#_):not(.btn-outline):not(.btn-danger):not(.icon-btn):hover:not(:disabled) { background: var(--bt-pri-h) !important; border-color: var(--bt-pri-h) !important; }
html body .btn:not(#_):not(.btn-outline):not(.btn-danger):not(.icon-btn):active:not(:disabled) { background: var(--bt-pri-a) !important; border-color: var(--bt-pri-a) !important; }
/* danger (Delete, Close Without Saving …) */
html body .btn.btn-danger:not(#_) { background: var(--bt-dan-bg) !important; border-color: var(--bt-dan-line) !important; color: var(--bt-dan) !important; }
html body .btn.btn-danger:not(#_):hover:not(:disabled) { background: var(--bt-dan-bg-h) !important; border-color: var(--bt-dan) !important; }
html body .btn.btn-danger:not(#_):active:not(:disabled) { background: var(--bt-dan-bg-h) !important; }
/* the red "Yes, sign out" stays a solid red button */
html body .btn.btn-signout-yes:not(#_):not(.btn-outline):not(.btn-danger) { background: #d23f3f !important; border-color: #d23f3f !important; color: #fff !important; }
html body .btn.btn-signout-yes:not(#_):not(.btn-outline):not(.btn-danger):hover { background: #b83232 !important; border-color: #b83232 !important; }
/* disabled: visibly unavailable */
html body .btn:not(#_):disabled, html body .btn:not(#_)[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none !important; }
/* small buttons (table rows, "Open load" …) */
html body .btn.btn-sm:not(#_), html body .back-btn:not(#_), html body .nx-back:not(#_) { height: var(--bt-h-sm); min-height: var(--bt-h-sm); padding: 0 11px; border-radius: 17px !important; font-size: 12.5px; gap: 6px; }
html body .btn.btn-sm:not(#_) .ic, html body .back-btn:not(#_) .ic, html body .nx-back:not(#_) .ic { font-size: 13.5px; }

/* "+ Second driver", "+ Second dispatcher": small secondary buttons in the primary color */
html body .tb-add:not(#_) { display: inline-flex !important; align-items: center; gap: 6px; height: var(--bt-h-sm); margin-top: 8px; padding: 0 11px; border: 1px solid var(--bt-line) !important; border-radius: 17px;
    background: var(--bt-bg2) !important; color: var(--bt-pri) !important; font: 600 12.5px var(--font); cursor: pointer; box-shadow: 0 1px 1.5px rgba(16, 24, 40, .06); transition: background-color .12s, border-color .12s; }
:root[data-theme="dark"] html body .tb-add:not(#_), :root[data-theme="dark"] body .tb-add:not(#_) { color: #a9c3f2 !important; }
html body .tb-add:not(#_)[style*="none"] { display: none !important; }
html body .tb-add:not(#_):hover { background: var(--bt-bg2-h) !important; border-color: var(--bt-line-h) !important; }
html body .tb-add:not(#_):active { background: var(--bt-bg2-a) !important; transform: translateY(1px); }
html body .tb-add:not(#_):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bt-ring); }
html body .tb-add:not(#_) .ic { font-size: 13px; }
/* remove (×) buttons: square icon buttons with the same outline */
html body .tb-rm:not(#_), html body .attachment-remove:not(#_) { display: inline-flex; align-items: center; justify-content: center; width: 34px !important; height: 34px; padding: 0; margin: 0;
    border: 1px solid var(--bt-line); border-radius: 17px; background: var(--bt-bg2); color: var(--tb-muted, var(--text-muted)); cursor: pointer; font-size: 13px; transition: background-color .12s, border-color .12s, color .12s; }
html body .attachment-remove:not(#_) { width: 28px !important; height: 28px; border-radius: 15px; }
html body .tb-rm:not(#_):hover, html body .attachment-remove:not(#_):hover { color: var(--bt-dan); border-color: var(--bt-dan-line); background: var(--bt-dan-bg); }
html body .tb-rm:not(#_):active, html body .attachment-remove:not(#_):active { transform: translateY(1px); }
html body .tb-rm:not(#_):focus-visible, html body .attachment-remove:not(#_):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bt-ring); }
/* window close (×) buttons */
html body .icon-btn.modal-close:not(#_) { width: 34px; height: 34px; padding: 0; border: 1px solid var(--bt-line) !important; border-radius: 19px !important; background: var(--bt-bg2) !important; color: var(--text-muted); display: inline-flex; align-items: center; justify-content: center; }
html body .icon-btn.modal-close:not(#_):hover, html body .icon-btn.modal-close:not(#_):focus-visible { border-color: var(--bt-dan-line) !important; }
html body .icon-btn.modal-close:not(#_):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bt-ring); }
html body .icon-btn.modal-close:not(#_):active { transform: translateY(1px); }
/* the calendar's Today / Clear / Close */
html body .dtf-foot button:not(#_) { border: 1px solid var(--bt-line); background: var(--bt-bg2); }
html body .dtf-foot button:not(#_):hover { background: var(--bt-bg2-h); filter: none; }
html body .dtf-foot button:not(#_):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bt-ring); }
/* "Cancel" (pick an existing Owner Operator instead) in the Database window */
html body .add-disp-btn.remove-disp-btn:not(#_) { height: 28px; padding: 0 10px; border: 1px solid var(--bt-line); border-radius: 15px; background: var(--bt-bg2); color: var(--bt-tx); }
/* "Notes & Comments" on Active Loads opens a window: the same secondary button */
html body .dsx-notes:not(#_) { border: 1px solid var(--bt-line) !important; background: var(--bt-bg2) !important; border-radius: var(--bt-r) !important; color: var(--bt-tx); box-shadow: 0 1px 1.5px rgba(16, 24, 40, .06) !important; cursor: pointer; transition: background-color .12s, border-color .12s; }
html body .dsx-notes:not(#_):hover { background: var(--bt-bg2-h) !important; border-color: var(--bt-line-h) !important; }
html body .dsx-notes:not(#_):active { background: var(--bt-bg2-a) !important; transform: translateY(1px); }
html body .dsx-notes:not(#_):focus-visible { outline: none; box-shadow: 0 0 0 3px var(--bt-ring) !important; }
/* touch screens: 44 px targets */
@media (pointer: coarse) {
    html body .btn:not(#_) { min-height: 44px; }
    html body .btn.btn-sm:not(#_), html body .back-btn:not(#_), html body .nx-back:not(#_), html body .tb-add:not(#_) { min-height: 40px; height: 40px; }
    html body .tb-rm:not(#_) { width: 44px !important; height: 44px; }
    html body .dsx-notes:not(#_) { min-height: 40px; }
    html body .attachment-remove:not(#_) { width: 40px !important; height: 40px; }
    html body .icon-btn.modal-close:not(#_) { width: 44px; height: 44px; }
    html body .add-disp-btn.remove-disp-btn:not(#_) { height: 40px; }
}
