/*
 * Project-wide action buttons.
 * Source of truth: the “+ New IPv4 Pool” Bootstrap outline button.
 */
:where(.btn, .premium-btn, button[type="submit"], input[type="submit"], input[type="button"]):not(.btn-link):not(.btn-navbar):not(.btn-tool):not(.close):not(.as-password-toggle):not(.dropdown-item) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: .25rem;
    min-height: 38px;
    padding: .375rem .75rem !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-radius: .25rem !important;
    font-size: 1rem;
    font-weight: 400 !important;
    line-height: 1.5;
    text-align: center;
    vertical-align: middle;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: none !important;
    transform: none !important;
    transition: color .15s ease-in-out, background-color .15s ease-in-out,
        border-color .15s ease-in-out, box-shadow .15s ease-in-out !important;
}

/* Preserve Bootstrap's compact and large size variants. */
:where(.btn-sm, .btn-group-sm > .btn) {
    min-height: 31px !important;
    padding: .25rem .5rem !important;
    font-size: .875rem !important;
    line-height: 1.5 !important;
}
:where(.btn-lg, .btn-group-lg > .btn) {
    min-height: 48px !important;
    padding: .5rem 1rem !important;
    font-size: 1.25rem !important;
}

/* Solid variants use the same outline appearance at rest. */
.content-wrapper .btn:not(.btn-link):not(.btn-navbar):not(.btn-tool):not(.close) {
    color:#343a40 !important;
    background-color:#fff !important;
    border-color:#343a40 !important;
}
.content-wrapper .btn:not(.btn-link):not(.btn-navbar):not(.btn-tool):not(.close),
.content-wrapper .btn:not(.btn-link):not(.btn-navbar):not(.btn-tool):not(.close) * {
    color:inherit !important;
}
:where(.btn-primary, .premium-btn-dark) { color:#007bff !important; background:#fff !important; border-color:#007bff !important; }
:where(.btn-secondary, .premium-btn-secondary) { color:#6c757d !important; background:#fff !important; border-color:#6c757d !important; }
.btn-success { color:#28a745 !important; background:#fff !important; border-color:#28a745 !important; }
.btn-danger { color:#dc3545 !important; background:#fff !important; border-color:#dc3545 !important; }
.btn-warning { color:#856404 !important; background:#fff !important; border-color:#ffc107 !important; }
.btn-info { color:#17a2b8 !important; background:#fff !important; border-color:#17a2b8 !important; }
.btn-dark { color:#343a40 !important; background:#fff !important; border-color:#343a40 !important; }

/* Beat legacy `.content-wrapper .btn-*` color repairs that otherwise create
   white text on the new white outline background. */
.content-wrapper .btn.btn-primary, .content-wrapper .btn.btn-outline-primary, .content-wrapper .premium-btn-dark { color:#007bff !important; background:#fff !important; border-color:#007bff !important; }
.content-wrapper .btn.btn-secondary, .content-wrapper .btn.btn-outline-secondary, .content-wrapper .premium-btn-secondary { color:#6c757d !important; background:#fff !important; border-color:#6c757d !important; }
.content-wrapper .btn.btn-success, .content-wrapper .btn.btn-outline-success { color:#28a745 !important; background:#fff !important; border-color:#28a745 !important; }
.content-wrapper .btn.btn-danger, .content-wrapper .btn.btn-outline-danger { color:#dc3545 !important; background:#fff !important; border-color:#dc3545 !important; }
.content-wrapper .btn.btn-warning, .content-wrapper .btn.btn-outline-warning { color:#856404 !important; background:#fff !important; border-color:#ffc107 !important; }
.content-wrapper .btn.btn-info, .content-wrapper .btn.btn-outline-info { color:#17a2b8 !important; background:#fff !important; border-color:#17a2b8 !important; }
.content-wrapper .btn.btn-dark, .content-wrapper .btn.btn-outline-dark { color:#343a40 !important; background:#fff !important; border-color:#343a40 !important; }

/* Outline and converted solid variants share the same filled hover state. */
:where(.btn-primary, .btn-outline-primary, .premium-btn-dark):hover,
:where(.btn-primary, .btn-outline-primary, .premium-btn-dark):focus { color:#fff !important; background:#007bff !important; border-color:#007bff !important; }
:where(.btn-secondary, .btn-outline-secondary, .premium-btn-secondary):hover,
:where(.btn-secondary, .btn-outline-secondary, .premium-btn-secondary):focus { color:#fff !important; background:#6c757d !important; border-color:#6c757d !important; }
:where(.btn-success, .btn-outline-success):hover,
:where(.btn-success, .btn-outline-success):focus { color:#fff !important; background:#28a745 !important; border-color:#28a745 !important; }
:where(.btn-danger, .btn-outline-danger):hover,
:where(.btn-danger, .btn-outline-danger):focus { color:#fff !important; background:#dc3545 !important; border-color:#dc3545 !important; }
:where(.btn-warning, .btn-outline-warning):hover,
:where(.btn-warning, .btn-outline-warning):focus { color:#212529 !important; background:#ffc107 !important; border-color:#ffc107 !important; }
:where(.btn-info, .btn-outline-info):hover,
:where(.btn-info, .btn-outline-info):focus { color:#fff !important; background:#17a2b8 !important; border-color:#17a2b8 !important; }
:where(.btn-dark, .btn-outline-dark):hover,
:where(.btn-dark, .btn-outline-dark):focus { color:#fff !important; background:#343a40 !important; border-color:#343a40 !important; }

.content-wrapper :where(.btn.btn-primary, .btn.btn-outline-primary, .premium-btn-dark):is(:hover,:focus,:active),
.content-wrapper :where(.btn.btn-primary, .btn.btn-outline-primary, .premium-btn-dark).active { color:#fff !important; background:#007bff !important; border-color:#007bff !important; }
.content-wrapper :where(.btn.btn-secondary, .btn.btn-outline-secondary, .premium-btn-secondary):is(:hover,:focus,:active),
.content-wrapper :where(.btn.btn-secondary, .btn.btn-outline-secondary, .premium-btn-secondary).active { color:#fff !important; background:#6c757d !important; border-color:#6c757d !important; }
.content-wrapper :where(.btn.btn-success, .btn.btn-outline-success):is(:hover,:focus,:active),
.content-wrapper :where(.btn.btn-success, .btn.btn-outline-success).active { color:#fff !important; background:#28a745 !important; border-color:#28a745 !important; }
.content-wrapper :where(.btn.btn-danger, .btn.btn-outline-danger):is(:hover,:focus,:active),
.content-wrapper :where(.btn.btn-danger, .btn.btn-outline-danger).active { color:#fff !important; background:#dc3545 !important; border-color:#dc3545 !important; }
.content-wrapper :where(.btn.btn-warning, .btn.btn-outline-warning):is(:hover,:focus,:active),
.content-wrapper :where(.btn.btn-warning, .btn.btn-outline-warning).active { color:#212529 !important; background:#ffc107 !important; border-color:#ffc107 !important; }
.content-wrapper :where(.btn.btn-info, .btn.btn-outline-info):is(:hover,:focus,:active),
.content-wrapper :where(.btn.btn-info, .btn.btn-outline-info).active { color:#fff !important; background:#17a2b8 !important; border-color:#17a2b8 !important; }
.content-wrapper :where(.btn.btn-dark, .btn.btn-outline-dark):is(:hover,:focus,:active),
.content-wrapper :where(.btn.btn-dark, .btn.btn-outline-dark).active { color:#fff !important; background:#343a40 !important; border-color:#343a40 !important; }

/* Raw submit controls without a semantic Bootstrap class use primary outline. */
:where(button[type="submit"], input[type="submit"], input[type="button"]):not([class*="btn-"]):not(.close):not(.dropdown-item) {
    color:#007bff !important;
    background:#fff !important;
    border-color:#007bff !important;
}
:where(button[type="submit"], input[type="submit"], input[type="button"]):not([class*="btn-"]):not(.close):not(.dropdown-item):hover,
:where(button[type="submit"], input[type="submit"], input[type="button"]):not([class*="btn-"]):not(.close):not(.dropdown-item):focus {
    color:#fff !important;
    background:#007bff !important;
}

:where(.btn, .premium-btn, button, input):disabled,
:where(.btn, .premium-btn, button, input).disabled {
    opacity:.65;
    cursor:not-allowed;
    pointer-events:none;
}
