/**
 * Toast Notifications
 * Global styles for toast notifications
 */

.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

/* RTL Support */
html[dir="rtl"] .toast-container {
    right: auto;
    left: 1rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: toastSlideIn 0.3s ease;
    min-width: 280px;
}

/* Toast Types */
.toast-success {
    border-left: 4px solid var(--primary-light, #63a194);
}

.toast-error {
    border-left: 4px solid var(--primary-dark, #8d1c3d);
}

.toast-warning {
    border-left: 4px solid #f59e0b;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

/* RTL Border Support */
html[dir="rtl"] .toast-success {
    border-left: none;
    border-right: 4px solid var(--primary-light, #63a194);
}

html[dir="rtl"] .toast-error {
    border-left: none;
    border-right: 4px solid var(--primary-dark, #8d1c3d);
}

html[dir="rtl"] .toast-warning {
    border-left: none;
    border-right: 4px solid #f59e0b;
}

html[dir="rtl"] .toast-info {
    border-left: none;
    border-right: 4px solid #3b82f6;
}

/* Toast Icon */
.toast-icon {
    flex-shrink: 0;
}

.toast-success .toast-icon {
    color: var(--primary-light, #63a194);
}

.toast-error .toast-icon {
    color: var(--primary-dark, #8d1c3d);
}

.toast-warning .toast-icon {
    color: #f59e0b;
}

.toast-info .toast-icon {
    color: #3b82f6;
}

/* Toast Message */
.toast-message {
    flex: 1;
    font-size: 0.95rem;
    color: #333;
}

/* Toast Close Button */
.toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: #666;
}

/* Animations - LTR */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* Animations - RTL */
html[dir="rtl"] .toast {
    animation: toastSlideInRtl 0.3s ease;
}

@keyframes toastSlideInRtl {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes toastSlideOutRtl {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}