/* Biz-Catalyst Notifications – Busybody Client Styles */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
    --biz-info: #3b82f6;
    --biz-info-bg: #eff6ff;
    --biz-success: #22c55e;
    --biz-success-bg: #f0fdf4;
    --biz-warning: #f59e0b;
    --biz-warning-bg: #fffbeb;
    --biz-error: #ef4444;
    --biz-error-bg: #fef2f2;
    --biz-text: #1f2937;
    --biz-text-muted: #6b7280;
    --biz-border: #e5e7eb;
    --biz-bg: #ffffff;
    --biz-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --biz-radius: 8px;
    --biz-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Bell Icon ─────────────────────────────────────────────── */
.biz-bell {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background-color 0.2s;
    user-select: none;
}

.biz-bell:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.biz-bell svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: var(--biz-text);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.biz-bell-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: var(--biz-error);
    color: #fff;
    font-family: var(--biz-font);
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    display: none;
}

.biz-bell-badge.visible {
    display: block;
}

/* ─── Bell Dropdown ─────────────────────────────────────────── */
.biz-bell-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-height: 420px;
    background: var(--biz-bg);
    border: 1px solid var(--biz-border);
    border-radius: var(--biz-radius);
    box-shadow: var(--biz-shadow);
    z-index: 10000;
    font-family: var(--biz-font);
    overflow: hidden;
}

.biz-bell-dropdown.open {
    display: flex;
    flex-direction: column;
}

.biz-bell-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--biz-border);
    font-size: 14px;
    font-weight: 600;
    color: var(--biz-text);
}

.biz-bell-dropdown-header button {
    background: none;
    border: none;
    color: var(--biz-info);
    font-size: 13px;
    cursor: pointer;
    font-family: var(--biz-font);
    padding: 0;
}

.biz-bell-dropdown-header button:hover {
    text-decoration: underline;
}

.biz-bell-dropdown-list {
    overflow-y: auto;
    flex: 1;
}

.biz-bell-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--biz-border);
    cursor: pointer;
    transition: background-color 0.15s;
    text-decoration: none;
    color: inherit;
}

.biz-bell-item:hover {
    background-color: #f9fafb;
}

.biz-bell-item.unread {
    background-color: #f0f7ff;
}

.biz-bell-item-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-top: 6px;
}

.biz-bell-item-dot.info { background: var(--biz-info); }
.biz-bell-item-dot.success { background: var(--biz-success); }
.biz-bell-item-dot.warning { background: var(--biz-warning); }
.biz-bell-item-dot.error { background: var(--biz-error); }
.biz-bell-item-dot.read { background: var(--biz-border); }

.biz-bell-item-content {
    flex: 1;
    min-width: 0;
}

.biz-bell-item-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--biz-text);
    margin-bottom: 2px;
}

.biz-bell-item-message {
    font-size: 12px;
    color: var(--biz-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.biz-bell-item-time {
    font-size: 11px;
    color: var(--biz-text-muted);
    margin-top: 4px;
}

.biz-bell-empty {
    padding: 32px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--biz-text-muted);
}

/* ─── Banners ───────────────────────────────────────────────── */
.biz-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin-bottom: 4px;
    border-left: 4px solid;
    font-family: var(--biz-font);
    font-size: 14px;
    color: var(--biz-text);
    position: relative;
}

.biz-banner.info {
    border-left-color: var(--biz-info);
    background: var(--biz-info-bg);
}

.biz-banner.warning {
    border-left-color: var(--biz-warning);
    background: var(--biz-warning-bg);
}

.biz-banner.error {
    border-left-color: var(--biz-error);
    background: var(--biz-error-bg);
}

.biz-banner-message {
    flex: 1;
}

.biz-banner-action {
    flex-shrink: 0;
    display: inline-block;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    border: none;
    font-family: var(--biz-font);
}

.biz-banner.info .biz-banner-action { background: var(--biz-info); }
.biz-banner.warning .biz-banner-action { background: var(--biz-warning); }
.biz-banner.error .biz-banner-action { background: var(--biz-error); }

.biz-banner-action:hover {
    opacity: 0.9;
}

.biz-banner-dismiss {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: var(--biz-text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
}

.biz-banner-dismiss:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* ─── Toasts ────────────────────────────────────────────────── */
.biz-toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.biz-toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    min-width: 280px;
    max-width: 400px;
    background: var(--biz-bg);
    border-radius: var(--biz-radius);
    box-shadow: var(--biz-shadow);
    border-left: 4px solid;
    font-family: var(--biz-font);
    font-size: 14px;
    color: var(--biz-text);
    pointer-events: auto;
    cursor: pointer;
    animation: biz-toast-in 0.25s ease-out;
}

.biz-toast.dismissing {
    animation: biz-toast-out 0.2s ease-in forwards;
}

.biz-toast.info    { border-left-color: var(--biz-info); }
.biz-toast.success { border-left-color: var(--biz-success); }
.biz-toast.warning { border-left-color: var(--biz-warning); }
.biz-toast.error   { border-left-color: var(--biz-error); }

.biz-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.biz-toast-icon.info    { color: var(--biz-info); }
.biz-toast-icon.success { color: var(--biz-success); }
.biz-toast-icon.warning { color: var(--biz-warning); }
.biz-toast-icon.error   { color: var(--biz-error); }

.biz-toast-message {
    flex: 1;
}

@keyframes biz-toast-in {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes biz-toast-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}
