/* =================================
   CUSTOM TOAST NOTIFICATION STYLES
   ================================= */

/* Toast Container Positioning */
.toastify {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    border: none;
    min-width: 300px;
    max-width: 400px;
    padding: 16px 20px;
    margin: 8px;
    transition: all 0.3s ease;
}

/* Toast Types */
.toast-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%) !important;
    color: white !important;
}

.toast-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%) !important;
    color: #212529 !important;
}

.toast-danger,
.toast-error {
    background: linear-gradient(135deg, #dc3545 0%, #e83e8c 100%) !important;
    color: white !important;
}

.toast-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%) !important;
    color: white !important;
}

/* Toast Close Button - Positioned at top-right */
.toastify {
    position: relative;
}

.toastify .toast-close {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    border-radius: 50% !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 12px !important;
    font-weight: bold !important;
    color: inherit !important;
    z-index: 10 !important;
    opacity: 0.8 !important;
}

.toastify .toast-close:hover {
    background: rgba(255, 255, 255, 0.4) !important;
    opacity: 1 !important;
    transform: scale(1.1) !important;
}

/* Ensure toast content has proper padding to avoid overlap with close button */
.toastify {
    padding-right: 35px !important;
}

/* Toast Animation */
.toastify.on {
    animation: toastSlideIn 0.3s ease-out;
}

.toastify.off {
    animation: toastSlideOut 0.3s ease-in;
}

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

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

/* Toast Icons */
.toast-icon {
    display: inline-block;
    margin-right: 8px;
    font-size: 16px;
    vertical-align: middle;
}

/* Responsive Design */
@media (max-width: 768px) {
    .toastify {
        min-width: 280px;
        max-width: 90vw;
        margin: 4px;
        padding: 12px 16px;
    }
}

@media (max-width: 480px) {
    .toastify {
        min-width: 260px;
        font-size: 13px;
        padding: 10px 14px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .toast-warning {
        color: #000 !important;
    }
}

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

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

/* Toast Hover Effects */
.toastify:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

/* Multiple Toast Stacking */
.toastify:nth-child(2) {
    margin-top: 12px;
}

.toastify:nth-child(3) {
    margin-top: 16px;
}

.toastify:nth-child(4) {
    margin-top: 20px;
}