/* Complete Toast Notification Styles */
/* Custom Toast Messages */
.toast-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: #fff;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    min-width: 300px;
    max-width: 500px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideInRight 0.5s ease-out;
    transition: all 0.3s ease;
}

/* Toast Types */
.toast-message.toast-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-left: 4px solid #155724;
}

.toast-message.toast-error {
    background: linear-gradient(135deg, #dc3545, #e74c3c);
    border-left: 4px solid #721c24;
}

.toast-message.toast-warning {
    background: linear-gradient(135deg, #ffc107, #f39c12);
    border-left: 4px solid #856404;
    color: #212529;
}

.toast-message.toast-info {
    background: linear-gradient(135deg, #8B4513, #A0522D);
    border-left: 4px solid #654321;
}

/* Toast Icons */
.toast-message::before {
    content: '';
    width: 20px;
    height: 20px;
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
}

.toast-message.toast-success::before {
    content: '✓';
    background: none;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
}

.toast-message.toast-error::before {
    content: '✕';
    background: none;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
}

.toast-message.toast-warning::before {
    content: '⚠';
    background: none;
    color: #212529;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
}

.toast-message.toast-info::before {
    content: 'ℹ';
    background: none;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
}

/* Toast Content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.toast-title {
    font-weight: 600;
    font-size: 15px;
    margin: 0;
}

.toast-text {
    font-size: 13px;
    opacity: 0.9;
    margin: 0;
    line-height: 1.4;
}

/* Close Button */
.toast-close-btn {
    background: none;
    border: none;
    color: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.toast-close-btn:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

.toast-message.toast-warning .toast-close-btn {
    color: #212529;
}

.toast-message.toast-warning .toast-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* Fade animations */
.toast-message.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.toast-message.fade-out {
    animation: slideOutRight 0.5s ease-in forwards;
}

/* Hover effects */
.toast-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Progress bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 8px 8px;
    animation: progress 5s linear forwards;
}

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

/* Multiple toasts stacking */
.toast-message:nth-child(2) {
    top: 90px;
}

.toast-message:nth-child(3) {
    top: 160px;
}

.toast-message:nth-child(4) {
    top: 230px;
}

/* Responsive design */
@media (max-width: 768px) {
    .toast-message {
        left: 10px;
        right: 10px;
        top: 10px;
        min-width: auto;
        max-width: none;
    }
    
    .toast-message:nth-child(2) {
        top: 80px;
    }
    
    .toast-message:nth-child(3) {
        top: 150px;
    }
    
    .toast-message:nth-child(4) {
        top: 220px;
    }
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .toast-message.toast-warning {
        color: #000;
    }
}

/* RTL support */
.toast-message.rtl {
    left: 20px;
    right: auto;
    animation: slideInLeft 0.5s ease-out;
}

.toast-message.rtl.fade-out {
    animation: slideOutLeft 0.5s ease-in forwards;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutLeft {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(-100%);
        opacity: 0;
    }
}

/* Accessibility */
.toast-message {
    role: alert;
    aria-live: polite;
}

.toast-message.toast-error {
    aria-live: assertive;
}

/* Focus styles for accessibility */
.toast-close-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .toast-message {
        display: none;
    }
}