/* ==========================================================================
   Deyfine — Toast Notification System
   Clean, minimal dark toasts matching the site's design language.
   ========================================================================== */

.deyfine-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-width: 380px;
    width: calc(100vw - 2rem);
    pointer-events: none;
}

.deyfine-toast-container--center {
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}

.deyfine-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: 1rem 1rem 1rem .75rem;
    background: var(--primary-color, #16181D);
    border: 1px solid rgba(255, 255, 255, .08);
    border-left: 3px solid var(--accent-color, #16181D);
    border-radius: 0 10px 10px 0;
    color: var(--white-color, #FFFFFF);
    font-size: 14px;
    font-family: var(--body-font, 'Overused Grotesk', sans-serif);
    line-height: 1.45;
    pointer-events: auto;
    overflow: hidden;
    opacity: 0;
    transform: translateX(40px);
    animation: toastIn .3s ease forwards;
    box-shadow: 0 4px 20px rgba(0, 0, 0, .2);
    transition: opacity .2s ease, transform .2s ease;
}

.deyfine-toast.toast-exit {
    animation: toastOut .2s ease forwards;
}

.deyfine-toast__icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    margin-top: 1px;
    opacity: .9;
}

.deyfine-toast__content {
    flex: 1;
    min-width: 0;
    word-break: break-word;
    padding-right: 1.25rem;
}

.deyfine-toast__close {
    position: absolute;
    top: .5rem;
    right: .5rem;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, .35);
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    border-radius: 4px;
    transition: color .15s, background .15s;
}

.deyfine-toast__close:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.deyfine-toast__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    border-radius: 0;
    animation: toastProgress linear forwards;
}

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

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

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

.deyfine-toast-container--center .deyfine-toast {
    border-radius: 10px;
    border-left: 1px solid rgba(255, 255, 255, .08);
    border-top: 3px solid var(--accent-color, #16181D);
    transform: translateY(-20px);
    animation: toastInDown .3s ease forwards;
}

.deyfine-toast-container--center .deyfine-toast.toast-exit {
    animation: toastOutUp .2s ease forwards;
}

@keyframes toastInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes toastOutUp {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-20px); }
}

/* ==========================================================================
   Variant Accent Colors — left border + icon + progress bar
   ========================================================================== */

/* 1. Safety Scan — green */
.deyfine-toast--safety-scan { border-left-color: #22c55e; }
.deyfine-toast--safety-scan .deyfine-toast__icon { color: #22c55e; }
.deyfine-toast--safety-scan .deyfine-toast__progress { background: #22c55e; }

/* 2. Gradient Sweep — indigo */
.deyfine-toast--gradient-sweep { border-left-color: #6366f1; }
.deyfine-toast--gradient-sweep .deyfine-toast__icon { color: #6366f1; }
.deyfine-toast--gradient-sweep .deyfine-toast__progress { background: #6366f1; }

/* 3. Streaming — cyan */
.deyfine-toast--streaming { border-left-color: #06b6d4; }
.deyfine-toast--streaming .deyfine-toast__icon { color: #06b6d4; }
.deyfine-toast--streaming .deyfine-toast__progress { background: #06b6d4; }

/* 4. Neural Pulse — purple */
.deyfine-toast--neural-pulse { border-left-color: #8b5cf6; }
.deyfine-toast--neural-pulse .deyfine-toast__icon { color: #8b5cf6; }
.deyfine-toast--neural-pulse .deyfine-toast__progress { background: #8b5cf6; }

/* 5. Data Flow — blue */
.deyfine-toast--data-flow { border-left-color: #3b82f6; }
.deyfine-toast--data-flow .deyfine-toast__icon { color: #3b82f6; }
.deyfine-toast--data-flow .deyfine-toast__progress { background: #3b82f6; }

/* 6. Quantum State — violet */
.deyfine-toast--quantum-state { border-left-color: #a855f7; }
.deyfine-toast--quantum-state .deyfine-toast__icon { color: #a855f7; }
.deyfine-toast--quantum-state .deyfine-toast__progress { background: #a855f7; }

/* 7. Code Matrix — emerald */
.deyfine-toast--code-matrix { border-left-color: #10b981; }
.deyfine-toast--code-matrix .deyfine-toast__icon { color: #10b981; }
.deyfine-toast--code-matrix .deyfine-toast__progress { background: #10b981; }

/* 8. Synaptic Fire — red */
.deyfine-toast--synaptic-fire { border-left-color: #ef4444; }
.deyfine-toast--synaptic-fire .deyfine-toast__icon { color: #ef4444; }
.deyfine-toast--synaptic-fire .deyfine-toast__progress { background: #ef4444; }

/* 9. Circuit Board — amber */
.deyfine-toast--circuit-board { border-left-color: #f59e0b; }
.deyfine-toast--circuit-board .deyfine-toast__icon { color: #f59e0b; }
.deyfine-toast--circuit-board .deyfine-toast__progress { background: #f59e0b; }

/* 10. Deep Scan — sky */
.deyfine-toast--deep-scan { border-left-color: #0ea5e9; }
.deyfine-toast--deep-scan .deyfine-toast__icon { color: #0ea5e9; }
.deyfine-toast--deep-scan .deyfine-toast__progress { background: #0ea5e9; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 480px) {
    .deyfine-toast-container {
        max-width: none;
        left: .5rem;
        right: .5rem;
        width: auto;
        top: 4.5rem;
    }

    .deyfine-toast {
        font-size: 13px;
        padding: .75rem 1.5rem .75rem .5rem;
        width: 100%;
    }

    .deyfine-toast__content {
        color: #fff;
        padding-right: 0;
    }

    .deyfine-toast-container--center {
        left: .5rem;
        right: .5rem;
        transform: none;
    }
}
