/* ==================== TOAST NOTIFICATION SYSTEM ==================== */

/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

/* Individual Toast Messages */
.toast-message {
    background: white;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    animation: toastSlideIn 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 280px;
    max-width: 380px;
    border-right: 4px solid;
    font-family: 'Cairo', sans-serif;
}

.toast-message:hover {
    transform: translateX(-5px);
}

.toast-icon {
    font-size: 1.3rem;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.toast-body {
    font-size: 0.85rem;
    opacity: 0.9;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    color: #999;
    transition: color 0.3s;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.toast-close:hover {
    color: #e74c3c;
    background: rgba(0, 0, 0, 0.05);
}

/* Toast Types */
.toast-success {
    border-right-color: #27ae60;
}

.toast-success .toast-icon {
    color: #27ae60;
}

.toast-error {
    border-right-color: #e74c3c;
}

.toast-error .toast-icon {
    color: #e74c3c;
}

.toast-warning {
    border-right-color: #f39c12;
}

.toast-warning .toast-icon {
    color: #f39c12;
}

.toast-info {
    border-right-color: #8b4d2d;
}

.toast-info .toast-icon {
    color: #8b4d2d;
}

/* Animations */
@keyframes toastSlideIn {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toastSlideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100px);
        opacity: 0;
    }
}

/* Popup Modal Toast */
.toast-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    z-index: 10001;
    animation: popupFadeIn 0.3s ease;
}

.toast-popup .popup-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.toast-popup .popup-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.toast-popup .popup-message {
    color: #666;
    margin-bottom: 1.5rem;
}

.toast-popup .popup-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.toast-popup .popup-btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s;
}

.toast-popup .popup-btn-confirm {
    background: #d1a056;
    color: #30170f;
}

.toast-popup .popup-btn-confirm:hover {
    background: #5f2a19;
    color: white;
}

.toast-popup .popup-btn-cancel {
    background: #f5f5f5;
    color: #666;
}

.toast-popup .popup-btn-cancel:hover {
    background: #e5e5e5;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Dark Mode */
body.dark-mode .toast-message {
    background: #2d2d2d;
    color: #f5f5f5;
}

body.dark-mode .toast-message .toast-close {
    color: #aaa;
}

body.dark-mode .toast-message .toast-close:hover {
    color: #e74c3c;
}

body.dark-mode .toast-popup {
    background: #2d2d2d;
    color: #f5f5f5;
}

body.dark-mode .toast-popup .popup-message {
    color: #ccc;
}

/* Responsive */
@media (max-width: 768px) {
    .toast-container {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .toast-message {
        max-width: calc(100% - 20px);
        min-width: auto;
        padding: 10px 15px;
    }
    
    .toast-popup {
        width: 90%;
        max-width: 350px;
        padding: 1.2rem;
    }
    
    .popup-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .popup-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .toast-container {
        left: 8px;
        right: 8px;
        bottom: 8px;
        gap: 8px;
    }
    
    .toast-message {
        padding: 8px 12px;
        border-radius: 10px;
    }
    
    .toast-title {
        font-size: 0.85rem;
    }
    
    .toast-body {
        font-size: 0.75rem;
    }
    
    .toast-popup {
        padding: 1rem;
        width: 95%;
    }
}