/* Modern Toast Notifications */

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 350px;
    pointer-events: none;
}

/* Individual Toast */
.toast-notification {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    max-width: 100%;
}

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

.toast-notification.hide {
    transform: translateX(120%);
    opacity: 0;
}

/* Toast Icons */
.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
}

.toast-notification.success .toast-icon {
    background: #27ae60;
    color: white;
}

.toast-notification.error .toast-icon {
    background: #e74c3c;
    color: white;
}

.toast-notification.info .toast-icon {
    background: #3498db;
    color: white;
}

.toast-notification.warning .toast-icon {
    background: #f39c12;
    color: white;
}

/* Toast Content */
.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-message {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    margin: 0;
}

/* Close Button */
.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    line-height: 1;
    transition: color 0.2s ease;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    color: #333;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
}

.toast-progress-bar {
    height: 100%;
    background: currentColor;
    width: 100%;
    transform-origin: left;
    animation: toast-progress 3s linear forwards;
}

.toast-notification.success .toast-progress-bar {
    background: #27ae60;
}

.toast-notification.error .toast-progress-bar {
    background: #e74c3c;
}

.toast-notification.info .toast-progress-bar {
    background: #3498db;
}

.toast-notification.warning .toast-progress-bar {
    background: #f39c12;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }
    to {
        transform: scaleX(0);
    }
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .toast-container {
        top: 20px;
        right: 16px;
        left: 16px;
        max-width: none;
        width: auto;
    }

    .toast-notification {
        padding: 14px 16px;
        margin-bottom: 10px;
    }

    .toast-message {
        font-size: 13px;
    }
}

/* Stacking Multiple Toasts */
.toast-container .toast-notification:nth-child(1) {
    z-index: 9999;
}

.toast-container .toast-notification:nth-child(2) {
    z-index: 9998;
}

.toast-container .toast-notification:nth-child(3) {
    z-index: 9997;
}

.toast-container .toast-notification:nth-child(n+4) {
    display: none;
}
