/* SwiftTenant shared button styles (approved 2026-10-23, trialed on AddCharge.aspx).
   Primary: solid slate #4a5568 (2026-10-26; was charcoal #1f2937) / white text. Secondary: solid light gray #e5e7eb / dark text.
   Danger stays solid red, success stays solid green. Buttons are always solid, never outline-only.
   Loaded site-wide (Site.Master and standalone pages). Selectors start with "html body" and use !important so older page-level
   and inline colors cannot bring back the bright blue. */

/* ---------- Primary (slate #4a5568) ---------- */

html body .btn-primary,
html body .btn-primary-slate,
html body .btn-dark,
html body .btn-outline-primary,
html body .btn-outline-dark,
html body .btn-info,
html body .btn-outline-info,
html body a.btn-primary,
html body a.btn-dark,
html body .lg-btn,
html body .wo-btn-primary,
html body .btn-tp-blue,
html body .ad-btn-blue,
html body .zillow-btn-primary,
html body a.lv-btn,
html body .btn-b,
html body .btn-gr,
html body .btn-check:checked + .btn-outline-secondary,
html body .btn-check:checked + .btn-outline-primary,
html body .btn-check:checked + .btn-outline-dark,
html body .btn-check:checked + .btn-outline-custom {
    background-color: #4a5568 !important;
    background-image: none !important;
    border-color: #4a5568 !important;
    color: #fff !important;
}
html body .btn-primary:hover,
html body .btn-primary-slate:hover,
html body .btn-primary-slate:focus,
html body .btn-primary-slate:active,
html body .btn-dark:hover,
html body .btn-outline-primary:hover,
html body .btn-outline-dark:hover,
html body .btn-info:hover,
html body .btn-outline-info:hover,
html body .lg-btn:hover,
html body .wo-btn-primary:hover,
html body .btn-tp-blue:hover,
html body .ad-btn-blue:hover,
html body .zillow-btn-primary:hover,
html body a.lv-btn:hover,
html body .btn-b:hover,
html body .btn-gr:hover,
html body .btn-primary:active,
html body .btn-dark:active,
html body .btn-outline-primary:active,
html body .btn-primary.active,
html body .btn-outline-primary.active,
html body .btn-primary:focus-visible,
html body .btn-dark:focus-visible,
html body .btn-outline-primary:focus-visible {
    background-color: #2d3748 !important;
    border-color: #2d3748 !important;
    color: #fff !important;
}
html body .btn-primary i,
html body .btn-primary-slate i,
html body .btn-dark i,
html body .lg-btn i,
html body .btn-tp-blue i,
html body .ad-btn-blue i { color: #fff !important; }

/* ---------- Secondary (light gray) ---------- */

html body .btn-secondary,
html body .btn-light,
html body .btn-default,
html body .btn-outline-secondary,
html body .btn-outline-light,
html body .btn-outline-custom,
html body a.btn-secondary,
html body a.btn-light,
html body .lg-btn-slate,
html body .lg-more,
html body .wo-btn-secondary,
html body .ad-btn-slate,
html body .btn-g,
html body .btn-sm-g,
html body .pm-btn-solid-light {
    background-color: #e5e7eb !important;
    background-image: none !important;
    border-color: #e5e7eb !important; /* same as the fill: solid, never reads as an outline */
    color: #1f2937 !important;
}
html body .btn-secondary:hover,
html body .btn-light:hover,
html body .btn-default:hover,
html body .btn-outline-secondary:hover,
html body .btn-outline-light:hover,
html body .btn-outline-custom:hover,
html body .lg-btn-slate:hover,
html body .lg-more:hover,
html body .wo-btn-secondary:hover,
html body .ad-btn-slate:hover,
html body .btn-g:hover,
html body .btn-sm-g:hover,
html body .pm-btn-solid-light:hover,
html body .btn-secondary:active,
html body .btn-light:active,
html body .btn-outline-secondary:active,
html body .btn-secondary:focus,
html body .btn-light:focus,
html body .btn-outline-secondary:focus,
html body .btn-secondary.show,
html body .btn-light.show,
html body .btn-outline-secondary.show {
    background-color: #d1d5db !important;
    border-color: #d1d5db !important;
    color: #111827 !important;
}
html body .btn-secondary i,
html body .btn-light i,
html body .btn-outline-secondary i,
html body .lg-btn-slate i,
html body .ad-btn-slate i { color: #1f2937 !important; }
/* keep checked toggle icons white */

html body .btn-check:checked + .btn-outline-secondary i,
html body .btn-check:checked + .btn-outline-custom i { color: #fff !important; }

/* ---------- Danger: always solid red ---------- */

html body .btn-outline-danger,
html body .btn-danger {
    background-color: #dc3545 !important; background-image: none !important;
    border-color: #dc3545 !important; color: #fff !important;
}
html body .btn-outline-danger:hover,
html body .btn-danger:hover,
html body .btn-outline-danger:focus,
html body .btn-danger:focus,
html body .btn-outline-danger:active,
html body .btn-danger:active {
    background-color: #bb2d3b !important; border-color: #b02a37 !important; color: #fff !important;
}
html body .btn-outline-danger i,
html body .btn-danger i { color: #fff !important; }

/* ---------- Success / warning: solid (semantic) ---------- */

html body .btn-outline-success { background-color: #198754 !important; border-color: #198754 !important; color: #fff !important; }
html body .btn-outline-success:hover { background-color: #157347 !important; border-color: #146c43 !important; }
html body .btn-outline-warning { background-color: #ffc107 !important; border-color: #ffc107 !important; color: #1f2937 !important; }

/* ---------- Shared shape, focus, disabled ---------- */
.btn-primary, .btn-secondary, .btn-light, .btn-default, .btn-dark, .btn-danger, .btn-success,
.btn-outline-primary, .btn-outline-secondary, .btn-outline-danger, .btn-outline-success, .btn-outline-dark {
    font-weight: 600;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(31, 41, 55, 0.25) !important; outline: none; }
.btn:disabled, .btn.disabled, .btn[disabled], fieldset:disabled .btn, .aspNetDisabled.btn {
    opacity: 0.55 !important; cursor: not-allowed; pointer-events: none;
}

/* ---------- Anchor buttons: global a / a:visited styles must never win (2026-10-25) ---------- */
a.btn, a.btn:link, a.btn:visited, a.btn:hover, a.btn:focus, a.btn:active,
a.ch-btn, a.ch-btn:visited, a.inv-btn, a.inv-btn:visited { text-decoration: none !important; }
a.btn-primary:visited, a.btn-dark:visited, a.btn-tp-blue, a.btn-tp-blue:link, a.btn-tp-blue:visited,
a.ch-btn-dark, a.ch-btn-dark:link, a.ch-btn-dark:visited, a.ch-btn-dark:hover,
a.inv-btn-primary, a.inv-btn-primary:visited, a.inv-btn-primary:hover { color: #fff !important; }
a.ch-btn-dark i, a.inv-btn-primary i, a.btn-tp-blue i { color: #fff !important; }
a.btn-secondary:visited, a.btn-light:visited, a.btn-outline-secondary:visited,
a.ch-btn-light, a.ch-btn-light:link, a.ch-btn-light:visited, a.ch-btn-light:hover,
a.inv-btn-secondary, a.inv-btn-secondary:visited, a.inv-btn-secondary:hover { color: #1f2937 !important; }
a.ch-btn-light i, a.inv-btn-secondary i { color: #1f2937 !important; }

/* Site standard (2026-10-31): page menus = gray labeled "More" + caret (pm-btn-solid-gray dropdown-toggle).
   Item menus (rows, cards, next to selectors) = this light unlabeled icon button, title/aria-label "More actions".
   Bootstrap .btn.show / :active / :focus uses --bs-btn-active-color, which washes these out to white on white
   once the menu is open. Keep the same gray fill and dark label. */
html body :is(.btn.pm-btn-solid-gray, .btn.lg-btn-slate.dropdown-toggle):is(:focus, :focus-visible, :active, .show, .active) {
    background-color: #e5e7eb !important;
    background-image: none !important;
    border-color: #e5e7eb !important;
    color: #1f2937 !important;
    box-shadow: none !important;
}
html body :is(.btn.pm-btn-solid-gray, .btn.lg-btn-slate.dropdown-toggle):hover {
    background-color: #d1d5db !important;
    border-color: #d1d5db !important;
    color: #1f2937 !important;
}
html body :is(.btn.pm-btn-solid-gray).dropdown-toggle::after { color: #1f2937; }
/* Icon-only controls (More, Filter, pencil, trash, refresh, close): no border or fill at rest.
   A real pointer gets a light hover; the keyboard gets a focus ring. Tap target is 40px. */
html body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x, .wo-actions-group .wo-btn-secondary) {
    display: inline-flex !important; align-items: center !important; justify-content: center !important; position: relative;
    width: 40px !important; height: 40px !important; min-width: 40px !important; min-height: 40px !important; padding: 0 !important; flex: 0 0 auto;
    background: transparent !important; background-image: none !important; border: 0 !important; box-shadow: none !important;
    color: #4b5563 !important; border-radius: 8px !important; font-size: 1.15rem; line-height: 1; -webkit-tap-highlight-color: transparent;
}
/* The shared icon rule uses display !important, so a plain style="display:none" cannot hide the filter
   or the old search Clear (the in-box X replaces that button; stFind still clicks it). */
html body :is(.st-more-icon, .br-fbtn, .cf-find-x, .br-find-x)[hidden] { display: none !important; }
html body :is(button, .cf-find-x, .br-find-x).st-search-replaced { display: none !important; }
html body :is(.st-more-icon, .st-icon, .lg-more, .rpt-sec-toggle, .pp-icon).dropdown-toggle::after,
html body :is(.st-more-icon, .st-icon, .lg-more)::after { display: none !important; }
html body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .um-funnel, .rpt-sec-toggle, .lf-btn) i,
html body :is(.st-more-icon, .pp-icon, .lg-more) .bi { color: inherit !important; margin: 0 !important; }
/* The ledger More glyph used to be display:none (it was a labeled button). Keep it painted in every state. */
html body .lg-more .lg-more-i,
html body .lg-more .bi-three-dots { display: inline-block !important; opacity: 1 !important; visibility: visible !important; }
html body .st-icon.st-icon-danger,
html body .st-icon.st-icon-danger i { color: #dc3545 !important; }
html body .st-icon.rf-files-btn { width: auto !important; min-width: 40px !important; padding: 0 .35rem !important; gap: 2px; }
html body :is(.td-icon-delete, .td-icon-btn.td-icon-delete, .lgx-ib .bi-trash, .lgx-ib .bi-trash3) { color: #dc3545 !important; }
@media (hover: hover) and (pointer: fine) {
    html body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x, .wo-actions-group .wo-btn-secondary):hover {
        background: rgba(15, 23, 42, .06) !important; color: #111827 !important;
    }
}
html body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x):focus-visible {
    outline: 2px solid #2563eb !important; outline-offset: 2px !important;
}
/* Open, pressed, and the Bootstrap .show state stay a light tint with a dark glyph.
   .btn.show otherwise paints --bs-btn-active-color (often white) and the icon vanishes. */
html body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x):is(:active, .show, .active, [aria-expanded="true"]) {
    background: rgba(15, 23, 42, .08) !important;
    background-color: rgba(15, 23, 42, .08) !important;
    background-image: none !important;
    border-color: transparent !important;
    color: #111827 !important;
    box-shadow: none !important;
}
html body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .rpt-sec-toggle, .lf-btn):is(:active, .show, .active, [aria-expanded="true"]) :is(i, .bi, svg) {
    color: inherit !important;
    opacity: 1 !important;
    visibility: visible !important;
}
html body .lg-actions .lg-more {
    width: 40px !important; min-width: 40px !important; padding: 0 !important;
    background: transparent !important; background-color: transparent !important; border-color: transparent !important;
    color: #4b5563 !important;
}
html body .lg-actions .lg-more:is(:active, .show, .active, [aria-expanded="true"]) {
    background: rgba(15, 23, 42, .08) !important; background-color: rgba(15, 23, 42, .08) !important;
    color: #111827 !important;
}
/* The shared gray-button :hover is a solid fill. Icon More stays borderless; only a fine pointer gets a tint. */
html body .lg-more.btn:hover {
    background: transparent !important; background-color: transparent !important; border-color: transparent !important; color: #4b5563 !important;
}
@media (hover: hover) and (pointer: fine) {
    html body .lg-more.btn:hover {
        background: rgba(15, 23, 42, .06) !important; background-color: rgba(15, 23, 42, .06) !important; color: #111827 !important;
    }
}
html body :is(.br-fdot, .lg-fcnt, .um-fbadge, .lf-badge, .st-fdot) {
    position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
    background: #2563eb !important; color: #fff !important; font-size: .65rem; font-weight: 700; line-height: 16px; text-align: center;
}
html body .lg-fcnt:empty, html body .st-fdot:empty { display: none !important; }
html body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x):is(:disabled, [aria-disabled="true"]) {
    opacity: .4 !important; cursor: default !important; background: transparent !important;
}
@media (hover: hover) and (pointer: fine) {
    html body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x):is(:disabled, [aria-disabled="true"]):hover {
        background: transparent !important; color: #4b5563 !important;
    }
}
/* Panel X (every popup): css/site-shell.css PANEL SHELL. */

/* Page titles: stay on one line next to header buttons; ellipsis only if truly out of room. */
.st-page-title { white-space: nowrap; flex-shrink: 0; }

/* Panel toolbars: funnel and More sit on the right by default.
   Wrap those icons in .st-toolbar-actions; left-side fields stay put. */
html body .st-toolbar-actions {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: .25rem;
    margin-left: auto;
    flex: 0 0 auto;
    justify-self: end;
}

/* ===== Icon-only controls in the dark theme (2026-11-18) =====
   theme.css filled and outlined More (⋯) and the funnel like gray buttons, and the shared #4b5563 glyph was faint on
   dark cards. They stay borderless and transparent with a light glyph, a hover tint, and a focus ring. */
html body .st-more-icon { font-size: 1.35rem; font-weight: 700; }
html body .st-more-icon > .bi { font-size: 1.15rem; }
html[data-bs-theme=dark] body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x),
html[data-bs-theme=dark] body .wo-actions-group .wo-btn.wo-btn-secondary.st-icon {
    background: transparent !important; background-color: transparent !important; background-image: none !important;
    border: 0 !important; box-shadow: none !important; color: #ced4da !important;
}
@media (hover: hover) and (pointer: fine) {
    html[data-bs-theme=dark] body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x):hover,
    html[data-bs-theme=dark] body .wo-actions-group .wo-btn.wo-btn-secondary.st-icon:hover {
        background: rgba(255, 255, 255, .08) !important; background-color: rgba(255, 255, 255, .08) !important; color: #fff !important;
    }
}
html[data-bs-theme=dark] body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x):is(:active, .show, .active, [aria-expanded="true"]),
html[data-bs-theme=dark] body .wo-actions-group .wo-btn.wo-btn-secondary.st-icon:active {
    background: rgba(255, 255, 255, .12) !important; background-color: rgba(255, 255, 255, .12) !important; color: #fff !important;
}
html[data-bs-theme=dark] body :is(.st-more-icon, .st-icon, .td-icon-btn, .pp-icon, .lgx-ib, .lg-ftog, .lg-more, .br-fbtn, .cf-fbtn, .ml-dots, .um-funnel, .kw-x, .rpt-sec-toggle, .lf-btn, .cf-find-x):focus-visible,
html[data-bs-theme=dark] body .wo-actions-group .wo-btn.wo-btn-secondary.st-icon:focus-visible {
    outline: 2px solid #8ab4ff !important; outline-offset: 2px !important;
}
html[data-bs-theme=dark] body :is(.st-icon.st-icon-danger, .td-icon-delete, .td-icon-btn.td-icon-delete),
html[data-bs-theme=dark] body :is(.st-icon.st-icon-danger, .td-icon-delete) i,
html[data-bs-theme=dark] body .lgx-ib :is(.bi-trash, .bi-trash3) { color: #ff8787 !important; }
/* Admin Documents keeps its dim gray row icons (approved as is). */
html[data-bs-theme=dark] body .doc-actions .st-icon:not(.st-icon-danger) { color: #4b5563 !important; }
html[data-bs-theme=dark] body .doc-actions .st-icon.st-icon-danger, html[data-bs-theme=dark] body .doc-actions .st-icon.st-icon-danger i { color: #dc3545 !important; }
