/**
 * Toast Notification Styles
 * Centralized toast notification styling to replace inline styles
 */

/* Base Toast Styles */
.toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 24px;
    background: var(--color-primary); /* Default blue background */
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    animation: slideInRight 0.3s ease-out;
    max-width: 400px;
    word-wrap: break-word;
}

/* Toast Type Variants.

   Under the v2 dark theme --color-success / --color-primary resolve to the
   bright neon green var(--neon), and --color-warning to amber #ffb84d — white
   text on either is illegible. Override the inherited `color: white` from
   .toast with the dark page background so the message reads cleanly on
   bright accent fills. Error keeps white text since the red is dark
   enough. */
.toast-success {
    background: var(--color-success);
    color: var(--bg-body);
    box-shadow: 0 4px 14px rgba(46, 255, 126, 0.35);
}

.toast-error {
    background: var(--color-error);
    color: #fff;
}

.toast-warning {
    background: var(--color-warning);
    color: var(--bg-body);
}

.toast-info {
    background: var(--color-primary);
    color: var(--bg-body);
}

/* Toast Animations */
@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

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

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

/* Toast exit animation */
.toast-exit {
    animation: slideOutRight 0.3s ease-out;
}

/* Alternative toast position (top-left) */
.toast-top-left {
    right: auto;
    left: 20px;
}

/* Alternative toast position (bottom-right) */
.toast-bottom-right {
    top: auto;
    bottom: 20px;
}

/* Alternative toast position (bottom-left) */
.toast-bottom-left {
    top: auto;
    bottom: 20px;
    right: auto;
    left: 20px;
}

/* Specific toast variants for different components */
.cardModal-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    padding: 12px 24px;
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10001;
    animation: slideInRight 0.3s ease-out;
}

.cardModal-toast-success {
    background: var(--color-success);
}

.cardModal-toast-error {
    background: var(--color-error);
}

/* Dark theme support */
.toast {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
    .toast,
    .cardModal-toast {
        right: 10px;
        left: 10px;
        max-width: calc(100% - 20px);
        top: 70px;
    }

    .toast-top-left {
        left: 10px;
    }

    .toast-bottom-right,
    .toast-bottom-left {
        bottom: 10px;
    }
}
