/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 320px;
    max-width: 400px;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    pointer-events: auto;
    transform: translateX(calc(100% + 1rem));
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
    border-left: 4px solid;
}

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

/* Dark mode */
.dark .toast {
    background: #1f2937;
    color: #f9fafb;
}

/* Toast types */
.toast-success {
    border-left-color: #10b981;
}

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

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

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

/* Toast icon */
.toast-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.toast-success .toast-icon {
    color: #10b981;
}

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

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

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

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

.toast-message {
    font-size: 0.875rem;
    line-height: 1.5;
    word-wrap: break-word;
}

/* Toast close button */
.toast-close {
    flex-shrink: 0;
    padding: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    border-radius: 0.25rem;
    transition: background-color 0.2s, color 0.2s;
}

.toast-close:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.dark .toast-close {
    color: #9ca3af;
}

.dark .toast-close:hover {
    background-color: #374151;
    color: #f9fafb;
}

/* Responsive */
@media (max-width: 640px) {
    .toast-container {
        left: 1rem;
        right: 1rem;
    }

    .toast {
        min-width: unset;
        width: 100%;
    }
}

/* Spinner for loading buttons */
.spinner-border {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    vertical-align: text-bottom;
    border: 0.15em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

.spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    border-width: 0.1em;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

.kt-btn-loading {
    opacity: 0.7;
    cursor: not-allowed;
}
