﻿

/* Toast Container */
.toast {
    position: fixed;
    top: 24px;
    right: 24px;
    min-width: 360px;
    max-width: 400px;
    background: #ffffff;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transform: translateY(-16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10000;
    pointer-events: none;
}

    /* Show Animation */
    .toast.show {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Hide Animation */
    .toast.hiding {
        opacity: 0;
        transform: translateY(-16px);
    }

/* ============================================================================
   TOAST ICON - Clean & Modern
   ============================================================================ */

.toast-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

/* ============================================================================
   TOAST CONTENT - Clean Typography
   ============================================================================ */

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 2px;
    line-height: 1.4;
}

.toast-message {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.4;
}

/* ============================================================================
   CLOSE BUTTON - Minimal
   ============================================================================ */

.toast-close {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

    .toast-close:hover {
        background: #f3f4f6;
        color: #4b5563;
    }

    .toast-close:active {
        transform: scale(0.95);
    }

/* ============================================================================
   PROGRESS BAR - Subtle
   ============================================================================ */

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 0 0 12px 12px;
    animation: progressBar 4s linear forwards;
}

@keyframes progressBar {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* Pause progress on hover */
.toast.show:hover .toast-progress {
    animation-play-state: paused;
}

/* ============================================================================
   COLOR VARIANTS - Professional & Clean
   ============================================================================ */

/* SUCCESS - Green */
.toast.success {
    border-left: 3px solid #10b981;
}

    .toast.success .toast-icon {
        background: #ecfdf5;
        color: #059669;
    }

    .toast.success .toast-progress {
        background: #10b981;
    }

/* ERROR - Red */
.toast.error {
    border-left: 3px solid #ef4444;
}

    .toast.error .toast-icon {
        background: #fef2f2;
        color: #dc2626;
    }

    .toast.error .toast-progress {
        background: #ef4444;
    }

/* WARNING - Orange */
.toast.warning {
    border-left: 3px solid #f59e0b;
}

    .toast.warning .toast-icon {
        background: #fffbeb;
        color: #d97706;
    }

    .toast.warning .toast-progress {
        background: #f59e0b;
    }

/* INFO - Blue */
.toast.info {
    border-left: 3px solid #3b82f6;
}

    .toast.info .toast-icon {
        background: #eff6ff;
        color: #2563eb;
    }

    .toast.info .toast-progress {
        background: #3b82f6;
    }

/* NEUTRAL - Gray (for general messages) */
.toast.neutral {
    border-left: 3px solid #6b7280;
}

    .toast.neutral .toast-icon {
        background: #f9fafb;
        color: #4b5563;
    }

    .toast.neutral .toast-progress {
        background: #6b7280;
    }

/* ============================================================================
   HOVER EFFECT - Subtle Lift
   ============================================================================ */

.toast.show:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Mobile */
@media (max-width: 640px) {
    .toast {
        top: 16px;
        right: 16px;
        left: 16px;
        min-width: auto;
        max-width: none;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    .toast {
        min-width: 340px;
        max-width: 380px;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .toast,
    .toast.show,
    .toast.hiding {
        transition: opacity 0.2s ease;
        animation: none;
    }
}

/* Focus Visible */
.toast-close:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* High Contrast */
@media (prefers-contrast: high) {
    .toast {
        border: 2px solid currentColor;
    }
}
