/* Base toast styles */
.custom-toast {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    border: none;
    padding: 16px 20px;
    min-width: 320px;
    max-width: 420px;
    backdrop-filter: blur(10px);
    position: relative;
    animation: slideIn 0.3s ease-out;
}

/* Slide in animation */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Toast type specific styles */
.success-toast {
    background-color: rgba(16, 185, 129, 0.95);
    color: white;
}

.error-toast {
    background-color: rgba(239, 68, 68, 0.95);
    color: white;
}

.info-toast {
    background-color: rgba(59, 130, 246, 0.95);
    color: white;
}

.warning-toast {
    background-color: rgba(245, 158, 11, 0.95);
    color: white;
}

/* Close button styles */
.toast-close-button {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: currentColor;
    padding: 0;
}

.toast-close-button:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.toast-close-button:active {
    transform: scale(0.95);
}

.toast-close-button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* Icon adjustments */
.blazored-toast-icon {
    font-size: 20px;
    margin-right: 12px;
    opacity: 1;
}

/* Toast content area */
.blazored-toast-body {
    padding-right: 36px; /* Make room for close button */
    line-height: 1.5;
}

/* Progress bar styling (if enabled) */
.blazored-toast-progressbar {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 0 0 8px 8px;
}

.blazored-toast-progressbar-fill {
    background-color: rgba(255, 255, 255, 0.7);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .custom-toast {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    }
}

/* Alternative close button designs - Option 2: Circular button */
.toast-close-button-alt {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border: 2px solid white;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: white;
    padding: 0;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
}

.toast-close-button-alt:hover {
    background-color: rgba(0, 0, 0, 0.9);
    transform: rotate(90deg) scale(1.1);
}

/* Alternative close button designs - Option 3: Minimal fade */
.toast-close-button-minimal {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: currentColor;
    padding: 0;
    opacity: 0.6;
    border-radius: 4px;
}

.toast-close-button-minimal:hover {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Custom animations for different toast types */
.success-toast {
    animation: slideIn 0.3s ease-out, pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2), 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    50% {
        box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3), 0 2px 6px rgba(0, 0, 0, 0.08);
    }
}

/* Responsive design */
@media (max-width: 480px) {
    .custom-toast {
        min-width: 280px;
        max-width: calc(100vw - 32px);
        margin: 8px;
    }
}
