/* ─────────────────────────────────────────────────────────────────────────
 * Squared corners — global Bootstrap 5.3 override.
 *
 * Brand goal: no rounded corners anywhere in the roots admin app. This file
 * zeros out border-radius on every Bootstrap component that ships with one,
 * and on the .rounded / .rounded-{size} utility classes.
 *
 * Loaded AFTER Bootstrap, so cascade alone would suffice for some rules,
 * but Bootstrap's defaults use specific selectors and per-corner radii;
 * we use !important here so this file is a single source of truth and
 * supersedes any inline `style="border-radius: …"` written into module
 * pages over the years.
 *
 * Intentionally preserved (NOT zeroed):
 *   - input[type="radio"]                  → must remain circular
 *   - .form-check-input[type="radio"]      → ditto (Bootstrap radio class)
 *   - .spinner-border, .spinner-grow       → circular by definition
 *   - .rounded-circle, .rounded-pill       → explicit utility classes; if
 *     anything in the codebase ever opts in to a circle/pill on purpose,
 *     it should keep working. (Audit on 2026-04-28 found zero usages.)
 *   - .kb-status-dot                       → 7×7 status indicator dot,
 *     uses border-radius:50% as a circle. Not a Bootstrap class so it is
 *     unaffected by any of the rules below.
 * ───────────────────────────────────────────────────────────────────────── */

/* Cards */
.card,
.card-header,
.card-body,
.card-footer,
.card-img,
.card-img-top,
.card-img-bottom,
.card-img-overlay {
    border-radius: 0 !important;
}

/* Buttons */
.btn,
.btn-group > .btn,
.btn-group-vertical > .btn,
.btn-close {
    border-radius: 0 !important;
}

/* Forms */
.form-control,
.form-control-plaintext,
.form-select,
.input-group,
.input-group > .form-control,
.input-group > .form-select,
.input-group > .input-group-text,
.input-group > .btn,
.input-group-text {
    border-radius: 0 !important;
}

/* Checkboxes — square them; radios stay round (handled by :not selector) */
.form-check-input:not([type="radio"]) {
    border-radius: 0 !important;
}

/* Badges (preserve .rounded-pill if intentionally used) */
.badge:not(.rounded-pill):not(.rounded-circle) {
    border-radius: 0 !important;
}

/* Alerts */
.alert {
    border-radius: 0 !important;
}

/* Modals */
.modal-content,
.modal-header,
.modal-footer,
.modal-dialog {
    border-radius: 0 !important;
}

/* Dropdowns */
.dropdown-menu,
.dropdown-item {
    border-radius: 0 !important;
}

/* List groups */
.list-group,
.list-group-item,
.list-group-item:first-child,
.list-group-item:last-child {
    border-radius: 0 !important;
}

/* Nav (tabs/pills) */
.nav-tabs .nav-link,
.nav-pills .nav-link,
.nav-link {
    border-radius: 0 !important;
}

/* Progress */
.progress,
.progress-bar,
.progress-stacked {
    border-radius: 0 !important;
}

/* Toasts */
.toast,
.toast-header,
.toast-body {
    border-radius: 0 !important;
}

/* Tables */
.table-bordered,
.table-responsive {
    border-radius: 0 !important;
}

/* Popovers / tooltips */
.popover,
.popover-header,
.popover-body,
.tooltip-inner {
    border-radius: 0 !important;
}

/* Accordions */
.accordion,
.accordion-item,
.accordion-item:first-of-type,
.accordion-item:last-of-type,
.accordion-button,
.accordion-button:not(.collapsed),
.accordion-collapse {
    border-radius: 0 !important;
}

/* Pagination */
.pagination,
.page-link,
.page-item:first-child .page-link,
.page-item:last-child .page-link {
    border-radius: 0 !important;
}

/* Form-range track on WebKit/Firefox stays round by design (it's a slider
 * thumb, not a corner radius), so we deliberately leave it alone. */

/* Utility classes — user wants these gone too */
.rounded {
    border-radius: 0 !important;
}
.rounded-0 { border-radius: 0 !important; }
.rounded-1,
.rounded-2,
.rounded-3,
.rounded-4,
.rounded-5,
.rounded-sm,
.rounded-lg {
    border-radius: 0 !important;
}
.rounded-top,
.rounded-end,
.rounded-bottom,
.rounded-start {
    border-radius: 0 !important;
}
/* NOTE: .rounded-circle and .rounded-pill are intentionally NOT overridden;
 * they are explicit shape utilities, not corner-rounding utilities. */
