/* Toast Notification System */

.toast-container {
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
    max-width: 400px;
    width: auto !important;
    height: auto !important;
    pointer-events: none;
    transform: none !important;
    /* Override universal theme transitions that affect positioning */
    transition-property: none !important;
    transition-duration: 0s !important;
    will-change: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(450px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
}

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

.toast.hiding {
    opacity: 0;
    transform: translateX(450px);
}

.toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-icon svg {
    width: 20px;
    height: 20px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    word-wrap: break-word;
}

.toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    font-size: 24px;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Toast Types */
.toast-success {
    border-left: 4px solid #28a745;
}

.toast-success .toast-icon {
    color: #28a745;
}

[data-theme="dark"] .toast-success {
    border-left-color: #75d989;
}

[data-theme="dark"] .toast-success .toast-icon {
    color: #75d989;
}

.toast-error {
    border-left: 4px solid #dc3545;
}

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

[data-theme="dark"] .toast-error {
    border-left-color: #f87171;
}

[data-theme="dark"] .toast-error .toast-icon {
    color: #f87171;
}

.toast-warning {
    border-left: 4px solid #ffc107;
}

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

[data-theme="dark"] .toast-warning {
    border-left-color: #fbbf24;
}

[data-theme="dark"] .toast-warning .toast-icon {
    color: #fbbf24;
}

.toast-info {
    border-left: 4px solid #17a2b8;
}

.toast-info .toast-icon {
    color: #17a2b8;
}

[data-theme="dark"] .toast-info {
    border-left-color: #60a5fa;
}

[data-theme="dark"] .toast-info .toast-icon {
    color: #60a5fa;
}

/* Confirm Dialog Styles */
.confirm-dialog {
    text-align: center;
    padding: 0;
}

.confirm-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.confirm-icon svg {
    width: 24px;
    height: 24px;
}

.confirm-icon-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #f59e0b;
}

.confirm-icon-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.confirm-icon-info {
    background: rgba(23, 162, 184, 0.1);
    color: #17a2b8;
}

.confirm-icon-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

[data-theme="dark"] .confirm-icon-warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .confirm-icon-danger {
    background: rgba(248, 113, 113, 0.2);
    color: #f87171;
}

[data-theme="dark"] .confirm-icon-info {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

[data-theme="dark"] .confirm-icon-success {
    background: rgba(117, 217, 137, 0.2);
    color: #75d989;
}

.confirm-message {
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
    margin: 0 0 20px 0;
    padding: 0 8px;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.confirm-actions button {
    min-width: 100px;
}

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

    .toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }

    .confirm-actions {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .confirm-actions button {
        width: 100%;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .toast {
        transition: opacity 0.1s ease;
        transform: none;
    }

    .toast.show {
        transform: none;
    }

    .toast.hiding {
        transform: none;
    }
}

/* Dark Theme Adjustments */
[data-theme="dark"] .toast {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
