/* Modern Toast Notification Styles for Golang Health */

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: all;
    border-left: 4px solid #ccc;
    transition: all 0.3s ease;
}

.toast-icon {
    font-size: 24px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
}

.toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
    flex-shrink: 0;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
}

.toast-close i {
    font-size: 18px;
    color: #666;
}

/* Toast Types */
.toast-success {
    border-left-color: #22c55e;
}

.toast-success .toast-icon {
    color: #22c55e;
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-error .toast-icon {
    color: #ef4444;
}

.toast-warning {
    border-left-color: #f59e0b;
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info {
    border-left-color: #3b82f6;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

/* Animations */
.toast-enter {
    opacity: 0;
    transform: translateX(400px);
}

.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-exit {
    opacity: 0;
    transform: translateX(400px);
}

/* Dark Mode Support */
body.dark-mode .toast {
    background: #1e2749;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

body.dark-mode .toast-message {
    color: #ffffff;
}

body.dark-mode .toast-close i {
    color: #b8c5d6;
}

body.dark-mode .toast-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .toast {
        min-width: auto;
        max-width: none;
    }
}

/* Stacking - add slight offset to multiple toasts */
.toast:nth-child(2) {
    margin-top: 5px;
}

.toast:nth-child(3) {
    margin-top: 10px;
}

.toast:nth-child(n+4) {
    margin-top: 15px;
}

/* Progress bar for auto-dismiss (optional enhancement) */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: toast-progress 3s linear;
}

@keyframes toast-progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}