/* Shared application button system. Document/email/PDF templates do not load it. */
:root {
    --qs-button-radius:8px;
    --qs-button-create:#272d38;
    --qs-button-create-hover:#151b25;
    --qs-button-primary:#4c8033;
    --qs-button-primary-hover:#3c6528;
    --qs-button-book:#3e5190;
    --qs-button-book-hover:#314176;
    --qs-button-secondary:#f4f9f7;
    --qs-button-text:#50615b;
    --qs-button-border:#d9e5e0;
    --qs-button-danger:#9b342c;
    --qs-button-danger-border:#d5aca6;
    --qs-button-focus:#267563;
}
@media screen {
    body .btn:where(:not(.btn-link):not(.btn-transparent)) {
        min-height:44px;
        padding:10px 16px;
        border-radius:var(--qs-button-radius)!important;
        font-weight:600;
        line-height:1.4;
        vertical-align:middle;
        background-image:none!important;
        box-shadow:none!important;
        text-shadow:none!important;
        background-color:var(--qs-button-secondary)!important;
        border-color:var(--qs-button-border)!important;
        color:var(--qs-button-text)!important;
    }
    body .btn:where(:not(.btn-link):not(.btn-transparent)):hover {
        background-color:#e2f1e9!important;
        border-color:#bad8ce!important;
    }
    body .btn.qs-button-create {
        background-color:var(--qs-button-create)!important;
        border-color:var(--qs-button-create)!important;
        color:#fff!important;
    }
    body .btn.qs-button-create:hover, body .btn.qs-button-create:active {
        background-color:var(--qs-button-create-hover)!important;
        border-color:var(--qs-button-create-hover)!important;
    }
    body .btn.qs-button-save {
        background-color:var(--qs-button-primary)!important;
        border-color:var(--qs-button-primary)!important;
        color:#fff!important;
    }
    body .btn.qs-button-save:hover, body .btn.qs-button-save:active {
        background-color:var(--qs-button-primary-hover)!important;
        border-color:var(--qs-button-primary-hover)!important;
    }
    body .btn.qs-button-book, body .btn.document-book-modal, body .btn.document-book {
        background-color:var(--qs-button-book)!important;
        border-color:var(--qs-button-book)!important;
        color:#fff!important;
    }
    body .btn.qs-button-book:hover, body .btn.document-book-modal:hover, body .btn.document-book:hover {
        background-color:var(--qs-button-book-hover)!important;
        border-color:var(--qs-button-book-hover)!important;
    }
    body .btn.btn-danger, body .btn.btn-delete, body .btn.btn-outline-danger, body .btn.qs-button-delete {
        background-color:transparent!important;
        color:var(--qs-button-danger)!important;
        border-color:var(--qs-button-danger-border)!important;
    }
    body .btn.btn-danger:hover, body .btn.btn-delete:hover, body .btn.btn-outline-danger:hover, body .btn.qs-button-delete:hover {
        background-color:#fff0ed!important;
        border-color:var(--qs-button-danger)!important;
    }
    body .btn.qs-button-back {
        background-color:#fff8e8!important;
        color:#806015!important;
        border-color:#dfc78c!important;
    }
    body .btn:where(:not(.btn-danger):not(.btn-delete):not(.qs-button-delete)):is(.is-active,[aria-pressed="true"],.active) {
        background-color:#e2f1e9!important;
        border-color:var(--qs-button-focus)!important;
        color:var(--qs-button-focus)!important;
    }
    body .btn:focus-visible {
        outline:3px solid var(--qs-button-focus)!important;
        outline-offset:3px;
    }
    body .btn.disabled, body .btn:disabled, body .btn[aria-disabled="true"] {
        opacity:.55!important;
        cursor:default;
    }
    body .btn.btn-sm, body .btn.btn-xs, body .btn.btn-icon, body .btn.btn-icon-sm,
    body .btn.btn-sm-icon, body .btn-group-sm > .btn, body .bootstrap-table .btn-toolbar .btn {
        min-height:36px;
        padding:6px 10px;
    }
    /* Connected controls share the same outer radius; inner joints stay flush. */
    body .btn-group > .btn:not(:nth-child(1 of .btn)):has(~ .btn) { border-radius:0!important; }
    body .btn-group > .btn:nth-child(1 of .btn):has(~ .btn) { border-radius:var(--qs-button-radius) 0 0 var(--qs-button-radius)!important; }
    body .btn-group > .btn:not(:nth-child(1 of .btn)):not(:has(~ .btn)) { border-radius:0 var(--qs-button-radius) var(--qs-button-radius) 0!important; }
    body .btn-group-vertical > .btn:not(:nth-child(1 of .btn)):has(~ .btn) { border-radius:0!important; }
    body .btn-group-vertical > .btn:nth-child(1 of .btn):has(~ .btn) { border-radius:var(--qs-button-radius) var(--qs-button-radius) 0 0!important; }
    body .btn-group-vertical > .btn:not(:nth-child(1 of .btn)):not(:has(~ .btn)) { border-radius:0 0 var(--qs-button-radius) var(--qs-button-radius)!important; }
    body .btn:where(:not(.btn-link):not(.btn-transparent)).w-100 { white-space:normal; overflow-wrap:anywhere; }
    body[data-document-experience="pilot"] .btn.qs-document-pdf-action {
        display:flex;
        align-items:center;
        white-space:nowrap!important;
        overflow-wrap:normal!important;
    }
}
