/* ============================================================
   FEDORA TOAST NOTIFICATION SYSTEM
   Include in header.php
   ============================================================ */

#toast-container {
    position: fixed;
    top: 90px; /* Below the 80px sticky header */
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 360px;
    width: calc(100vw - 40px);
}

.toast {
    pointer-events: all;
    background: rgba(12, 6, 22, 0.97);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04) inset;
    animation: toastSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    position: relative;
}

.toast.toast-dismissing {
    animation: toastSlideOut 0.3s ease-in forwards;
}

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

@keyframes toastSlideOut {
    from { opacity: 1; transform: translateX(0) scale(1); max-height: 200px; margin-bottom: 0; }
    to   { opacity: 0; transform: translateX(40px) scale(0.95); max-height: 0; margin-bottom: -10px; }
}

/* Accent bar on left edge */
.toast::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    border-radius: 16px 0 0 16px;
}

.toast-success::before { background: #10b981; }
.toast-error::before   { background: #ef4444; }
.toast-warning::before { background: #f97316; }
.toast-info::before    { background: #db46e6; }

.toast-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 16px 14px 20px;
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.toast-success .toast-icon { background: rgba(16,185,129,0.15); color: #10b981; }
.toast-error   .toast-icon { background: rgba(239,68,68,0.15);   color: #ef4444; }
.toast-warning .toast-icon { background: rgba(249,115,22,0.15);  color: #f97316; }
.toast-info    .toast-icon { background: rgba(219,70,230,0.15);  color: #db46e6; }

.toast-icon svg {
    width: 16px;
    height: 16px;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.toast-content { flex: 1; min-width: 0; }

.toast-title {
    font-size: 0.78rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 0.3px;
    margin-bottom: 3px;
    line-height: 1.3;
}

.toast-message {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.55);
    line-height: 1.5;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    cursor: pointer;
    padding: 2px;
    border-radius: 6px;
    transition: 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}
.toast-close:hover { color: #fff; background: rgba(255,255,255,0.08); }
.toast-close svg {
    width: 13px; height: 13px;
    display: block;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* Progress bar */
.toast-progress {
    height: 2px;
    background: rgba(255,255,255,0.06);
    border-radius: 0 0 16px 16px;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    border-radius: inherit;
    animation: toastProgress linear forwards;
    transform-origin: left;
}

.toast-success .toast-progress-bar { background: #10b981; }
.toast-error   .toast-progress-bar { background: #ef4444; }
.toast-warning .toast-progress-bar { background: #f97316; }
.toast-info    .toast-progress-bar { background: #db46e6; }

@keyframes toastProgress {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* Mobile: full width at bottom on very small screens */
@media (max-width: 480px) {
    #toast-container {
        top: auto;
        bottom: 20px;
        right: 10px;
        left: 10px;
        max-width: none;
        width: auto;
    }
}