/* ============================================================
   bs-ui-helpers.css
   Thay thế MudBlazor bằng Bootstrap thuần (hỗ trợ iOS 15+).
   Giữ nguyên bảng màu / bố cục hiện tại của DSP.WEB.
   ============================================================ */

:root {
    --dsp-primary: #052767;
    --dsp-secondary: #3a0647;
    --dsp-drawer-bg: #0f2d5e;
    --dsp-drawer-text: rgba(255,255,255,0.87);
}

/* ── App bar (thay MudAppBar) ── */
.dsp-appbar {
    background: var(--dsp-primary);
    color: #fff;
    height: 48px;
    min-height: 48px;
    z-index: 1030;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,.2);
}
.dsp-appbar .btn-icon {
    color: #fff;
    background: transparent;
    border: none;
}
.dsp-appbar .btn-icon:hover { background: rgba(255,255,255,.12); }

/* ── Drawer / Sidebar (thay MudDrawer) ── */
.dsp-drawer {
    background: var(--dsp-drawer-bg);
    color: var(--dsp-drawer-text);
    width: 260px;
    z-index: 1040;
}
.dsp-drawer-header {
    background: linear-gradient(135deg,#052767 0%,#3a0647 100%);
    padding: 12px 16px;
}
.dsp-drawer-header .title { color: #fff; font-weight: 700; font-size: .95rem; margin: 0; }
.dsp-drawer-header .subtitle { color: rgba(255,255,255,.6); font-size: .75rem; }

@media (min-width: 992px) {
    .dsp-drawer {
        position: sticky;
        top: 48px;
        height: calc(100vh - 48px);
        overflow-y: auto;
        flex: 0 0 260px;
    }
    .dsp-drawer.offcanvas {
        position: sticky !important;
        visibility: visible !important;
        transform: none !important;
        display: block !important;
        border: none;
    }
    .dsp-drawer-backdrop { display: none !important; }
}

.dsp-main-content { padding: 16px; flex: 1 1 auto; min-width: 0; }

.dsp-body-wrapper {
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 48px);
}

/* ── Nav menu (thay MudNavMenu / MudNavLink / MudNavGroup) ── */
.dsp-navmenu { padding: 8px 0; }
.dsp-navmenu .nav-link {
    color: var(--dsp-drawer-text);
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    font-size: .875rem;
    border-radius: 0;
}
.dsp-navmenu .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.dsp-navmenu .nav-link.active { background: rgba(255,255,255,.16); color: #fff; font-weight: 600; }
.dsp-navmenu .nav-link i { width: 20px; text-align: center; flex-shrink: 0; }

.dsp-nav-group > .nav-group-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    cursor: pointer;
    color: var(--dsp-drawer-text);
    font-size: .875rem;
    user-select: none;
}
.dsp-nav-group > .nav-group-toggle:hover { background: rgba(255,255,255,.08); color: #fff; }
.dsp-nav-group > .nav-group-toggle i.chevron {
    margin-left: auto;
    transition: transform .2s ease;
}
.dsp-nav-group > .nav-group-toggle[aria-expanded="true"] i.chevron { transform: rotate(180deg); }
.dsp-nav-group .nav-group-body .nav-link { padding-left: 44px; }

/* ── Chip (thay MudChip) ── */
.dsp-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 12px;
    padding: 2px 10px;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.6;
}
.dsp-chip-warning { background: #ff9800; color: #fff; }
.dsp-chip-success { background: #2e7d32; color: #fff; }
.dsp-chip-info { background: #0288d1; color: #fff; }
.dsp-chip-error { background: #d32f2f; color: #fff; }
.dsp-chip-default { background: #9e9e9e; color: #fff; }

/* ── Toast/Snackbar container (thay MudSnackbarProvider) ── */
.dsp-toast-container {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 90vw;
}
.dsp-toast {
    min-width: 260px;
    max-width: 420px;
    color: #fff;
    padding: 10px 16px;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,.3);
    font-size: .875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: dsp-toast-in .2s ease-out;
}
.dsp-toast-success { background: #2e7d32; }
.dsp-toast-error { background: #d32f2f; }
.dsp-toast-warning { background: #ed6c02; }
.dsp-toast-info { background: #0288d1; }
.dsp-toast-normal { background: #424242; }
@keyframes dsp-toast-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Progress linear (thay MudProgressLinear) ── */
.dsp-progress-linear {
    height: 4px;
    background: rgba(0,0,0,.1);
    border-radius: 2px;
    overflow: hidden;
}
.dsp-progress-linear > .bar {
    height: 100%;
    background: var(--dsp-primary);
    transition: width .3s ease;
}
.dsp-progress-linear.indeterminate > .bar {
    width: 40%;
    animation: dsp-indeterminate 1.2s infinite ease-in-out;
}
@keyframes dsp-indeterminate {
    0% { margin-left: -40%; }
    100% { margin-left: 100%; }
}

/* ── Paper / Card panel (thay MudPaper) ── */
.dsp-paper {
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.15);
}

/* ── Overlay drawer mobile (backdrop) ── */
.dsp-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1035;
}
