/* ============================================================================
   TOAST NOTIFICATIONS - Lawfunder Admin
   Replaces/supplements Bootstrap alert banners with slide-in toast messages.
   ============================================================================ */

/* ── Toast Container ── */
.lf-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 420px;
    pointer-events: none;
}

/* ── Individual Toast ── */
.lf-toast {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 0.5rem;
    background: #fff;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
    border-left: 4px solid #6c757d;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                opacity 0.35s ease;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.875rem;
    line-height: 1.4;
    max-width: 100%;
}

.lf-toast.lf-toast-visible {
    transform: translateX(0);
    opacity: 1;
}

.lf-toast.lf-toast-hiding {
    transform: translateX(120%);
    opacity: 0;
}

/* ── Toast Icon ── */
.lf-toast-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    line-height: 1;
    margin-top: 0.1rem;
}

/* ── Toast Body ── */
.lf-toast-body {
    flex: 1;
    min-width: 0;
}

.lf-toast-title {
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.lf-toast-message {
    color: #495057;
    word-wrap: break-word;
}

/* ── Toast Close ── */
.lf-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #6c757d;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    margin-top: 0.1rem;
    transition: color 0.15s;
}

.lf-toast-close:hover {
    color: #212529;
}

/* ── Toast Variants ── */
.lf-toast-success {
    border-left-color: #198754;
}
.lf-toast-success .lf-toast-icon {
    color: #198754;
}

.lf-toast-error {
    border-left-color: #dc3545;
}
.lf-toast-error .lf-toast-icon {
    color: #dc3545;
}

.lf-toast-warning {
    border-left-color: #ffc107;
}
.lf-toast-warning .lf-toast-icon {
    color: #ffc107;
}

.lf-toast-info {
    border-left-color: #0d6efd;
}
.lf-toast-info .lf-toast-icon {
    color: #0d6efd;
}

/* ── Progress bar (auto-dismiss timer) ── */
.lf-toast-progress {
    position: absolute;
    bottom: 0;
    left: 4px;
    right: 0;
    height: 3px;
    border-radius: 0 0 0.5rem 0;
    overflow: hidden;
}

.lf-toast-progress-bar {
    height: 100%;
    background: currentColor;
    opacity: 0.3;
    animation: lf-toast-countdown linear forwards;
}

@keyframes lf-toast-countdown {
    from { width: 100%; }
    to { width: 0%; }
}

/* ── Skeleton Loaders ── */
.lf-skeleton {
    background: linear-gradient(90deg, #e9ecef 25%, #f8f9fa 50%, #e9ecef 75%);
    background-size: 200% 100%;
    animation: lf-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: 0.25rem;
}

@keyframes lf-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton text lines */
.lf-skeleton-text {
    height: 0.875rem;
    margin-bottom: 0.5rem;
    width: 100%;
}

.lf-skeleton-text-sm {
    height: 0.75rem;
    width: 60%;
}

.lf-skeleton-text-lg {
    height: 1.25rem;
    width: 80%;
}

/* Skeleton shapes */
.lf-skeleton-circle {
    border-radius: 50%;
}

.lf-skeleton-card {
    height: 120px;
    border-radius: 0.5rem;
}

.lf-skeleton-stat {
    height: 80px;
    border-radius: 0.5rem;
}

/* Skeleton table row */
.lf-skeleton-row {
    display: flex;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.lf-skeleton-row .lf-skeleton-cell {
    height: 1rem;
    flex: 1;
}

.lf-skeleton-row .lf-skeleton-cell:first-child {
    flex: 0.5;
}

/* Skeleton stat card placeholder */
.lf-skeleton-stat-card {
    padding: 1.25rem;
    background: #fff;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
}

.lf-skeleton-stat-card .lf-skeleton-value {
    height: 2rem;
    width: 40%;
    margin-bottom: 0.5rem;
}

.lf-skeleton-stat-card .lf-skeleton-label {
    height: 0.75rem;
    width: 70%;
}

/* ── Notification Bell Badge ── */
.lf-notification-badge {
    position: absolute;
    top: -2px;
    right: -4px;
    background: #dc3545;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 9px;
    padding: 0 4px;
    border: 2px solid #fff;
}

.lf-notification-bell .btn:hover {
    color: #1F4E79 !important;
}

/* Notification list items */
.lf-notification-item {
    display: flex;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    color: inherit;
}

.lf-notification-item:hover {
    background: #f8f9fa;
}

.lf-notification-item.unread {
    background: #f0f7ff;
}

.lf-notification-item.unread:hover {
    background: #e3f0fd;
}

.lf-notification-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.lf-notification-icon.bg-success-soft { background: #d1e7dd; color: #198754; }
.lf-notification-icon.bg-warning-soft { background: #fff3cd; color: #856404; }
.lf-notification-icon.bg-danger-soft  { background: #f8d7da; color: #dc3545; }
.lf-notification-icon.bg-info-soft    { background: #cfe2ff; color: #0d6efd; }
.lf-notification-icon.bg-primary-soft { background: #d0e0f0; color: #1F4E79; }

.lf-notification-body {
    flex: 1;
    min-width: 0;
}

.lf-notification-title {
    font-size: 0.8125rem;
    font-weight: 500;
    margin-bottom: 0.125rem;
    line-height: 1.3;
}

.lf-notification-time {
    font-size: 0.7rem;
    color: #6c757d;
}
