/* Custom Toast Alert Styles for Better Visibility */

/* Toast Container Positioning */
#toast-container {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 999999 !important;
    pointer-events: none;
}

/* Individual Toast Styling */
#toast-container > div {
    position: relative !important;
    pointer-events: auto !important;
    overflow: visible !important;
    margin: 0 0 15px !important;
    padding: 15px 20px !important;
    padding-left: 65px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    color: #ffffff !important;
    opacity: 1 !important;
    max-width: 400px !important;
    min-width: 300px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    border: none !important;
    background-color: #28a745 !important; /* Default success background */
    background-image: none !important; /* Remove default background images */
}

/* Success Toast */
.toast-success {
    background: #28a745 !important;
    padding-left: 65px !important;
    color: #ffffff !important;
    position: relative !important;
}

.toast-success::before {
    content: '✓' !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 24px !important;
    color: #ffffff !important;
    font-weight: bold !important;
    line-height: 1 !important;
    z-index: 10 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Error Toast */
.toast-error {
    background: #dc3545 !important;
    padding-left: 65px !important;
    color: #ffffff !important;
    position: relative !important;
}

.toast-error::before {
    content: '✕' !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 22px !important;
    color: #ffffff !important;
    font-weight: bold !important;
    line-height: 1 !important;
    z-index: 10 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Info Toast */
.toast-info {
    background: #17a2b8 !important;
    padding-left: 65px !important;
    color: #ffffff !important;
    position: relative !important;
}

.toast-info::before {
    content: 'ℹ' !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 24px !important;
    color: #ffffff !important;
    font-weight: bold !important;
    line-height: 1 !important;
    z-index: 10 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.25) !important;
    border-radius: 50% !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}

/* Warning Toast */
.toast-warning {
    background: #ffc107 !important;
    padding-left: 65px !important;
    color: #000000 !important;
    position: relative !important;
}

.toast-warning::before {
    content: '⚠' !important;
    position: absolute !important;
    left: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    font-size: 24px !important;
    color: #000000 !important;
    font-weight: bold !important;
    line-height: 1 !important;
    z-index: 10 !important;
    width: 32px !important;
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.15) !important;
    border-radius: 50% !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3) !important;
}

/* Toast Title */
.toast-title {
    font-weight: 600 !important;
    font-size: 16px !important;
    color: #ffffff !important;
    margin-bottom: 5px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
}

/* Toast Message */
.toast-message {
    color: #ffffff !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    margin: 0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    word-wrap: break-word !important;
    -ms-word-wrap: break-word !important;
}

/* Close Button */
.toast-close-button {
    position: absolute !important;
    right: 10px !important;
    top: 10px !important;
    color: #ffffff !important;
    font-size: 18px !important;
    font-weight: bold !important;
    opacity: 0.8 !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.2s ease !important;
}

.toast-close-button:hover {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.2) !important;
    transform: scale(1.1) !important;
}

/* Progress Bar */
.toast-progress {
    position: absolute !important;
    left: 0 !important;
    bottom: 0 !important;
    height: 3px !important;
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 0 0 8px 8px !important;
}

/* Hover Effects */
#toast-container > div:hover {
    transform: translateX(-5px) !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2) !important;
    transition: all 0.3s ease !important;
}

/* Animation for new toasts */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

#toast-container > div {
    animation: slideInRight 0.3s ease-out !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    #toast-container {
        top: 10px !important;
        right: 10px !important;
        left: 10px !important;
    }
    
    #toast-container > div {
        max-width: none !important;
        min-width: auto !important;
        margin: 0 0 10px !important;
        padding: 12px 15px !important;
        padding-left: 45px !important;
    }
    
    .toast-title {
        font-size: 15px !important;
    }
    
    .toast-message {
        font-size: 13px !important;
    }
}

/* Override any conflicting styles */
.toast-container > div {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

/* Force background colors for all toast types */
#toast-container .toast-error,
#toast-container .toast-error * {
    background-color: #dc3545 !important;
    color: #ffffff !important;
}

#toast-container .toast-success,
#toast-container .toast-success * {
    background-color: #28a745 !important;
    color: #ffffff !important;
}

#toast-container .toast-info,
#toast-container .toast-info * {
    background-color: #17a2b8 !important;
    color: #ffffff !important;
}

#toast-container .toast-warning,
#toast-container .toast-warning * {
    background-color: #5dade2 !important;
    color: #000000 !important;
}

/* Ensure text is always visible */
.toast-message a,
.toast-message label {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.toast-message a:hover {
    color: #f8f9fa !important;
    text-decoration: none !important;
}

/* Force text color for warning toasts */
.toast-warning .toast-message a,
.toast-warning .toast-message label,
.toast-warning .toast-title {
    color: #000000 !important;
}

/* Ensure icons are always visible - override all conflicting styles */
#toast-container .toast-success::before,
#toast-container .toast-error::before,
#toast-container .toast-info::before,
#toast-container .toast-warning::before {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Remove any default background images that might hide icons */
#toast-container .toast-success,
#toast-container .toast-error,
#toast-container .toast-info,
#toast-container .toast-warning {
    background-image: none !important;
}

/* Ensure icon container doesn't get hidden */
#toast-container > div::before {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none !important;
}
