/* assets/styles/toast.css */

#toast-container {
    position: fixed;
    z-index: 1021 !important;
    pointer-events: none;
}

.toast-position-wrapper {
    position: fixed;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast-top-left {
    top: 20px;
    left: 20px;
    align-items: flex-start;
}

.toast-top-right {
    top: 20px;
    right: 20px;
    align-items: flex-end;
}

.toast-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}

.toast-bottom-left {
    bottom: 20px;
    left: 20px;
    align-items: flex-start;
}

.toast-bottom-right {
    bottom: 20px;
    right: 20px;
    align-items: flex-end;
}

.toast-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}

.toast {
    min-width: 300px;
    max-width: 500px;
    background: #f8fafc;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    pointer-events: auto;
    animation: slideIn 0.3s ease-out;
    position: relative;
}

.toast-removing {
    animation: slideOut 0.3s ease-out forwards;
}

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

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

.toast-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
    font-size: 16px;
}

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

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

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

.toast-progress {
    height: 4px;
    background: rgba(0, 0, 0, 0.1);
    animation: progress linear;
}

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* Success Toast */
.toast-success .toast-icon {
    background: #10b981;
    color: white;
}

.toast-success .toast-progress {
    background: #10b981;
}

/* Error Toast */
.toast-error .toast-icon {
    background: #ef4444;
    color: white;
}

.toast-error .toast-progress {
    background: #ef4444;
}

/* Warning Toast */
.toast-warning .toast-icon {
    background: #f59e0b;
    color: white;
}

.toast-warning .toast-progress {
    background: #f59e0b;
}

/* Info Toast */
.toast-info .toast-icon {
    background: #3b82f6;
    color: white;
}

.toast-info .toast-progress {
    background: #3b82f6;
}

/* Responsive */
@media (max-width: 640px) {
    .toast {
        min-width: 280px;
        max-width: calc(100vw - 40px);
    }

    .toast-position-wrapper {
        left: 20px !important;
        right: 20px !important;
        transform: none !important;
        align-items: stretch !important;
    }
}
