/* ===============================================
   Notifications CSS
   =============================================== */

.announcement-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: linear-gradient(90deg, var(--color-navy), var(--color-navy-light));
    color: #fff;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
    font-size: var(--fs-sm);
}

.announcement__badge {
    background: var(--color-danger);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
}

/* ===============================================
   Toast Notifications
   =============================================== */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 420px;
    width: 100%;
}

.toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
    animation: toastSlideIn 0.35s cubic-bezier(0.21, 1.02, 0.73, 1) forwards;
    overflow: hidden;
}

[data-theme="dark"] .toast {
    background: #1a1a1e;
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ── Left accent bar ── */
.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--color-info, #3b82f6);
    border-radius: 10px 0 0 10px;
}

.toast.success::before { background: #16a34a; }
.toast.error::before   { background: #dc2626; }
.toast.warning::before { background: #d97706; }

[data-theme="dark"] .toast.success::before { background: #22c55e; }
[data-theme="dark"] .toast.error::before   { background: #ef4444; }
[data-theme="dark"] .toast.warning::before { background: #f59e0b; }
[data-theme="dark"] .toast::before         { background: #60a5fa; }

/* ── Icon ── */
.toast__icon {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.toast__icon svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
}

.toast:not([class*="success"]):not([class*="error"]):not([class*="warning"]) .toast__icon {
    background: var(--color-info, #3b82f6);
}

.toast.success .toast__icon { background: #16a34a; }
.toast.error .toast__icon   { background: #dc2626; }
.toast.warning .toast__icon { background: #d97706; }

[data-theme="dark"] .toast:not([class*="success"]):not([class*="error"]):not([class*="warning"]) .toast__icon {
    background: #3b82f6;
}
[data-theme="dark"] .toast.success .toast__icon { background: #22c55e; }
[data-theme="dark"] .toast.error .toast__icon   { background: #ef4444; }
[data-theme="dark"] .toast.warning .toast__icon { background: #f59e0b; }

/* ── Content ── */
.toast__content {
    flex: 1;
    min-width: 0;
}

.toast__title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-heading, #1a1a1a);
    line-height: 1.3;
    margin-bottom: 2px;
}

[data-theme="dark"] .toast__title {
    color: #f0f0f0;
}

.toast__message {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: var(--text-body, #6b7280);
    line-height: 1.45;
}

[data-theme="dark"] .toast__message {
    color: #9ca3af;
}

/* ── Dismiss button ── */
.toast__dismiss {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-muted, #9ca3af);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    margin: -4px -4px -4px 0;
}

.toast__dismiss svg {
    width: 14px;
    height: 14px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

.toast__dismiss:hover {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-heading, #1a1a1a);
}

[data-theme="dark"] .toast__dismiss:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* ── Auto-dismiss progress bar ── */
.toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--color-info, #3b82f6);
    border-radius: 0 0 0 10px;
    animation: toastProgress 4s linear forwards;
}

.toast.success .toast__progress { background: #16a34a; }
.toast.error .toast__progress   { background: #dc2626; }
.toast.warning .toast__progress { background: #d97706; }

[data-theme="dark"] .toast:not([class*="success"]):not([class*="error"]):not([class*="warning"]) .toast__progress {
    background: #3b82f6;
}
[data-theme="dark"] .toast.success .toast__progress { background: #22c55e; }
[data-theme="dark"] .toast.error .toast__progress   { background: #ef4444; }
[data-theme="dark"] .toast.warning .toast__progress { background: #f59e0b; }

@keyframes toastProgress {
    from { width: 100%; }
    to   { width: 0%; }
}

/* ── Hover pause ── */
.toast:hover .toast__progress {
    animation-play-state: paused;
}

/* ── Exit animation ── */
.toast.toast--exiting {
    animation: toastSlideOut 0.25s ease-in forwards;
}

@keyframes toastSlideIn {
    from {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
    to {
        transform: translateX(100%) scale(0.95);
        opacity: 0;
    }
}

/* ── Mobile ── */
@media (max-width: 480px) {
    .toast-container {
        top: auto;
        bottom: 16px;
        right: 12px;
        left: 12px;
        max-width: none;
    }

    .toast {
        min-width: 0;
        padding: 12px 14px;
    }
}

/* Skeleton Loading */
.skeleton-loader {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-input) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}