/**
 * BatterSuite Demo Mode Styles
 *
 * Applied when .bp-demo-mode wrapper is present.
 * Hides all interactive / mutating elements so the demo is read-only.
 */

/* ── Hide all interactive elements (body-level so modals are caught too) ── */
body.bp-demo-mode form,
body.bp-demo-mode button,
body.bp-demo-mode input:not([type="hidden"]),
body.bp-demo-mode textarea,
body.bp-demo-mode select,
body.bp-demo-mode .bp-modal-overlay,
body.bp-demo-mode .bp-modal,
body.bp-demo-mode .modal-overlay,
body.bp-demo-mode .bp-add-btn,
body.bp-demo-mode .bp-edit-btn,
body.bp-demo-mode .bp-delete-btn,
body.bp-demo-mode .bp-top-actions,
body.bp-demo-mode .bp-bulk-actions,
body.bp-demo-mode .bp-onboarding-checklist,
body.bp-demo-mode .bp-action-bar,
body.bp-demo-mode [data-action] { display: none !important; }

/* ── Exceptions: keep demo banner and nav strip interactive ─────────────── */
.bs-demo-banner,
.bs-demo-banner *,
.bs-demo-nav,
.bs-demo-nav * { display: revert !important; }

/* ── Keep data/display elements visible ─────────────────────────────────── */
body.bp-demo-mode table  { display: table !important; }
body.bp-demo-mode thead  { display: table-header-group !important; }
body.bp-demo-mode tbody  { display: table-row-group !important; }
body.bp-demo-mode tr     { display: table-row !important; }
body.bp-demo-mode th,
body.bp-demo-mode td     { display: table-cell !important; }
body.bp-demo-mode .bp-stat-card,
body.bp-demo-mode .card,
body.bp-demo-mode .bp-page-header,
body.bp-demo-mode .site-header,
body.bp-demo-mode nav    { display: block !important; }

/* ── Demo Banner ─────────────────────────────────────────────────────────── */
.bs-demo-banner {
    position: sticky;
    top: 0;
    z-index: 99999;
    background: #1e2d40;
    color: #fff;
    padding: 7px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.bs-demo-banner__text {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255,255,255,0.8);
}

.bs-demo-banner__badge {
    background: #e85d4a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    border-radius: 3px;
    flex-shrink: 0;
}

.bs-demo-banner__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bs-demo-banner__btn {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.bs-demo-banner__btn:hover { opacity: 0.85; text-decoration: none; }

.bs-demo-banner__btn--primary {
    background: #f0a500;
    color: #1e2d40;
}

.bs-demo-banner__logout {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    text-decoration: none;
    padding: 0 2px;
}

.bs-demo-banner__logout:hover { color: rgba(255,255,255,0.8); }

/* ── Demo Nav Strip ──────────────────────────────────────────────────────── */
.bs-demo-nav {
    background: #f8f9fa;
    border-bottom: 1px solid #dde1e7;
    padding: 8px 16px;
    overflow-x: auto;
    white-space: nowrap;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.bs-demo-nav::-webkit-scrollbar { height: 3px; }
.bs-demo-nav::-webkit-scrollbar-thumb { background: #c8cdd5; border-radius: 3px; }

.bs-demo-nav a {
    display: inline-block;
    padding: 4px 12px;
    margin-right: 4px;
    border-radius: 20px;
    color: #4a5568;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e2e6ea;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.bs-demo-nav a:hover {
    background: #e9ecf0;
    color: #1e2d40;
    text-decoration: none;
}

.bs-demo-nav a.active {
    background: #1e2d40;
    color: #fff;
    border-color: #1e2d40;
}

/* ── Demo Password Form ───────────────────────────────────────────────────── */
.bs-demo-gate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e2d40 0%, #2d4a6b 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 20px;
}

.bs-demo-gate__card {
    background: #fff;
    border-radius: 12px;
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.bs-demo-gate__logo {
    font-size: 28px;
    font-weight: 800;
    color: #1e2d40;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.bs-demo-gate__logo span { color: #f0a500; }

.bs-demo-gate__subtitle {
    color: #718096;
    font-size: 14px;
    margin-bottom: 32px;
    line-height: 1.5;
}

.bs-demo-gate__label {
    display: block;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 6px;
}

.bs-demo-gate__input {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    margin-bottom: 16px;
    transition: border-color 0.15s;
    color: #2d3748;
}

.bs-demo-gate__input:focus {
    outline: none;
    border-color: #1e2d40;
}

.bs-demo-gate__submit {
    width: 100%;
    padding: 12px;
    background: #1e2d40;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.bs-demo-gate__submit:hover { background: #2d4a6b; }

.bs-demo-gate__error {
    background: #fff5f5;
    border: 1px solid #feb2b2;
    color: #c53030;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 13px;
    margin-bottom: 16px;
    text-align: left;
}

.bs-demo-gate__features {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    text-align: left;
}

.bs-demo-gate__features p {
    font-size: 12px;
    color: #718096;
    margin: 0 0 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bs-demo-gate__features ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
}

.bs-demo-gate__features li {
    font-size: 12px;
    color: #4a5568;
    padding: 2px 0;
}

.bs-demo-gate__features li::before {
    content: "✓ ";
    color: #38a169;
    font-weight: 700;
}
