/* ============================================
   BOOTSTRAP COMPATIBILITY CSS

   Minimal replacement for Bootstrap 5 utility classes
   still referenced by migrated pages. MudBlazor provides
   most layout/spacing/flex utilities (d-flex, me-2, mb-3,
   gap-*, overflow-*, etc.) so only non-MudBlazor classes
   are included here.

   Created during Phase 7 (Bootstrap Cleanup) of MudBlazor migration.
   ============================================ */

/* ============================================
   1. LAYOUT UTILITIES
   ============================================ */
.container-fluid {
    width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
    margin-right: auto;
    margin-left: auto;
}

.vh-100 { height: 100vh; }
.h-100 { height: 100%; }
.w-100 { width: 100%; }

/* ============================================
   2. BACKGROUND COLORS
   ============================================ */
.bg-white { background-color: #fff; }
.bg-light { background-color: #f8f9fa; }
.bg-primary { background-color: var(--mud-palette-primary, #1976d2); color: #fff; }
.bg-primary-subtle { background-color: rgba(var(--mud-palette-primary-rgb, 25, 118, 210), 0.1); }

/* ============================================
   3. BORDER UTILITIES
   ============================================ */
.border { border: 1px solid #dee2e6; }
.border-bottom { border-bottom: 1px solid #dee2e6; }
.border-top { border-top: 1px solid #dee2e6; }
.border-end { border-right: 1px solid #dee2e6; }
.border-start { border-left: 1px solid #dee2e6; }
.border-5 { border-width: 5px !important; }
.border-success { border-color: var(--mud-palette-success, #2e7d32) !important; }
.rounded { border-radius: 0.375rem; }

/* ============================================
   4. TEXT COLORS
   ============================================ */
.text-primary { color: var(--mud-palette-primary, #1976d2); }
.text-success { color: var(--mud-palette-success, #2e7d32); }
.text-danger { color: var(--mud-palette-error, #d32f2f); }
.text-warning { color: var(--mud-palette-warning, #ed6c02); }
.text-info { color: #607d8b; }
.text-dark { color: #333 !important; }
.text-muted, .text-secondary { color: #6c757d; }
.text-white { color: #fff; }
.white-text { color: #fff; }

/* ============================================
   5. FONT / TEXT UTILITIES
   ============================================ */
.fw-bold { font-weight: 700; }
.fw-medium { font-weight: 500; }
.font-monospace { font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }
.small { font-size: 0.875em; }
.x-small { font-size: 0.75em; }
.fs-4 { font-size: calc(1.275rem + .3vw); }
.text-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ============================================
   6. BUTTON CLASSES
   Used in Registrants.razor table rows (lightweight HTML)
   and a few other non-migrated spots.
   ============================================ */
.btn {
    display: inline-block;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.375rem;
    transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out;
}
.btn:disabled { opacity: 0.65; pointer-events: none; }

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}
.btn-lg {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
    border-radius: 0.5rem;
}

.btn-primary {
    color: var(--tenant-primary-contrast, #fff);
    background-color: var(--tenant-primary, var(--mud-palette-primary, #1976d2));
    border-color: var(--tenant-primary, var(--mud-palette-primary, #1976d2));
}
.btn-primary:hover {
    background-color: var(--tenant-primary-hover, #1565c0);
    border-color: var(--tenant-primary-hover, #1565c0);
}

.btn-success {
    color: #fff;
    background-color: var(--mud-palette-success, #2e7d32);
    border-color: var(--mud-palette-success, #2e7d32);
}
.btn-success:hover {
    background-color: #256b28;
    border-color: #256b28;
}

.btn-outline-primary {
    color: var(--mud-palette-primary, #1976d2);
    border-color: var(--mud-palette-primary, #1976d2);
    background-color: transparent;
}
.btn-outline-primary:hover {
    color: #fff;
    background-color: var(--mud-palette-primary, #1976d2);
}

.btn-outline-warning {
    color: var(--mud-palette-warning, #ed6c02);
    border-color: var(--mud-palette-warning, #ed6c02);
    background-color: transparent;
}
.btn-outline-warning:hover {
    color: #fff;
    background-color: var(--mud-palette-warning, #ed6c02);
}

.btn-outline-danger {
    color: var(--mud-palette-error, #d32f2f);
    border-color: var(--mud-palette-error, #d32f2f);
    background-color: transparent;
}
.btn-outline-danger:hover {
    color: #fff;
    background-color: var(--mud-palette-error, #d32f2f);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}
.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
}

/* ============================================
   7. SPINNER CLASSES
   Used in Registrants.razor & Badges.razor
   ============================================ */
@keyframes spinner-border-anim {
    to { transform: rotate(360deg); }
}
@keyframes spinner-grow-anim {
    0% { transform: scale(0); }
    50% { opacity: 1; transform: scale(1); }
}

.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    border: 0.25em solid currentcolor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border-anim .75s linear infinite;
}
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}

.spinner-grow {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: -0.125em;
    background-color: currentcolor;
    border-radius: 50%;
    opacity: 0;
    animation: spinner-grow-anim .75s linear infinite;
}
.spinner-grow-sm {
    width: 1rem;
    height: 1rem;
}

/* ============================================
   8. LIST GROUP (Badges.razor)
   ============================================ */
.list-group {
    display: flex;
    flex-direction: column;
    padding-left: 0;
    margin-bottom: 0;
}
.list-group-flush > .list-group-item {
    border-width: 0 0 1px;
}
.list-group-item {
    position: relative;
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, .125);
}
.list-group-item-action {
    cursor: pointer;
}
.list-group-item-action:hover {
    background-color: #f8f9fa;
}

/* ============================================
   9. FORM CONTROLS (Import.razor file input)
   ============================================ */
.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.form-control:focus {
    border-color: var(--mud-palette-primary, #86b7fe);
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(var(--mud-palette-primary-rgb, 25, 118, 210), 0.25);
}

/* ============================================
   10. MISCELLANEOUS
   ============================================ */
.vr {
    display: inline-block;
    align-self: stretch;
    width: 1px;
    min-height: 1em;
    background-color: currentcolor;
    opacity: 0.25;
}

.list-unstyled {
    padding-left: 0;
    list-style: none;
}
