/* ══════════════════════════════════════════════════════════
 *  BahnTools – Toast & Confirm Styles
 * ══════════════════════════════════════════════════════════ */

/* ── Toast container (fixed top-right) ──────────────────── */
#bt-toast-container {
    position: fixed;
    top: 70px;          /* below navbar */
    right: 20px;
    z-index: 1080;      /* above modals (1055) */
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 420px;
    width: 100%;
    pointer-events: none;
}

/* ── Individual toast ───────────────────────────────────── */
.bt-toast {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 8px;
    color: #fff;
    box-shadow: 0 6px 24px rgba(0,0,0,.18);
    pointer-events: auto;
    opacity: 0;
    transform: translateX(60px);
    transition: opacity .3s ease, transform .3s ease;
    font-size: .9rem;
    line-height: 1.4;
    word-break: break-word;
}
.bt-toast--show {
    opacity: 1;
    transform: translateX(0);
}
.bt-toast--hide {
    opacity: 0;
    transform: translateX(60px);
}

/* ── Type colours ───────────────────────────────────────── */
.bt-toast--success { background: #198754; }
.bt-toast--error   { background: #dc3545; }
.bt-toast--warning { background: #fd7e14; color: #212529; }
.bt-toast--info    { background: #0d6efd; }

/* ── Icon ───────────────────────────────────────────────── */
.bt-toast__icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Body ───────────────────────────────────────────────── */
.bt-toast__body {
    flex: 1;
    min-width: 0;
}
.bt-toast__title {
    display: block;
    margin-bottom: 2px;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    opacity: .85;
}
.bt-toast__msg {
    display: block;
}

/* ── Close button ───────────────────────────────────────── */
.bt-toast__close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    opacity: .7;
    padding: 0 0 0 4px;
    flex-shrink: 0;
}
.bt-toast__close:hover { opacity: 1; }

/* ── Warning colour adjustment ──────────────────────────── */
.bt-toast--warning .bt-toast__close { color: #212529; }

/* ══════════════════════════════════════════════════════════
 *  Custom Confirm Modal overrides
 * ══════════════════════════════════════════════════════════ */
#btConfirmModal .modal-header {
    border-bottom: 2px solid var(--global-primary-color, #c8102e);
}
#btConfirmModal .modal-title {
    font-weight: 600;
}

/* ══════════════════════════════════════════════════════════
 *  Notification badge (in navbar)
 * ══════════════════════════════════════════════════════════ */
#bt-notif-badge {
    position: absolute;
    top: 2px;
    right: -4px;
    font-size: .65rem;
    padding: 2px 5px;
    border-radius: 10px;
    line-height: 1;
}

/* ── Dark theme adjustments ─────────────────────────────── */
[data-theme="dark"] .bt-toast {
    box-shadow: 0 6px 24px rgba(0,0,0,.4);
}
[data-theme="dark"] #btConfirmModal .modal-content {
    background: var(--bs-dark, #212529);
    color: var(--bs-light, #f8f9fa);
}
[data-theme="dark"] #btConfirmModal .modal-header {
    border-color: var(--global-primary-color, #c8102e);
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 576px) {
    #bt-toast-container {
        top: auto;
        bottom: 16px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}
