﻿/* gooey-toast — Morphing dynamic organic toast notifications for SynapseMed QuizPulse */
@keyframes gooey-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes gooey-enter {
    0% {
        opacity: 0;
        transform: translateY(-28px) scale(0.82);
        filter: blur(8px);
    }
    55% {
        transform: translateY(6px) scale(1.03);
        filter: blur(0px);
    }
    80% {
        transform: translateY(-2px) scale(0.99);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes gooey-exit {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.85);
        filter: blur(6px);
    }
}

.gooey-toaster {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
    width: 100%;
    max-width: 480px;
    padding: 0 16px;
    box-sizing: border-box;
}

.gooey-wrapper {
    pointer-events: auto;
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    position: relative;
    width: fit-content;
    max-width: 100%;
    animation: gooey-enter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.gooey-wrapper:hover {
    transform: scale(1.02);
}

.gooey-wrapper.gooey-removing {
    animation: gooey-exit 0.32s cubic-bezier(0.4, 0, 1, 1) forwards;
    pointer-events: none;
}

/* Morphing Background Shell with organic shadow & border */
.gooey-background {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: rgba(16, 28, 56, 0.94);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 14px 34px -8px rgba(10, 17, 36, 0.6),
        0 0 20px rgba(26, 106, 195, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.gooey-wrapper:hover .gooey-background {
    border-color: rgba(243, 171, 27, 0.4);
    box-shadow: 
        0 18px 40px -8px rgba(10, 17, 36, 0.7),
        0 0 24px rgba(243, 171, 27, 0.25),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* Toast Inner Container */
.gooey-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px 10px 14px;
    min-height: 48px;
    box-sizing: border-box;
}

/* Icon Shell with pulse gradient */
.gooey-icon-box {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gooey-icon-box.success {
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(16, 185, 129, 0.4);
    color: #10b981;
}

.gooey-icon-box.error {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.gooey-icon-box.warning {
    background: rgba(243, 171, 27, 0.18);
    border-color: rgba(243, 171, 27, 0.4);
    color: #f3ab1b;
}

.gooey-icon-box.info {
    background: rgba(26, 106, 195, 0.2);
    border-color: rgba(26, 106, 195, 0.4);
    color: #38bdf8;
}

.gooey-icon-box.battle {
    background: rgba(236, 72, 153, 0.2);
    border-color: rgba(236, 72, 153, 0.5);
    color: #f472b6;
}

.gooey-icon-box svg {
    width: 17px;
    height: 17px;
}

.gooey-spinnerSpin {
    animation: gooey-spin 0.9s linear infinite;
}

/* Text block */
.gooey-text-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    min-width: 0;
}

.gooey-title {
    font-size: 13px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.gooey-description {
    font-size: 11.5px;
    font-weight: 500;
    color: #94a3b8;
    line-height: 1.35;
    margin-top: 1px;
}

/* Close action */
.gooey-close-btn {
    margin-left: 6px;
    color: rgba(255, 255, 255, 0.4);
    transition: color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
}

.gooey-close-btn:hover {
    color: #ffffff;
}
