/*!
 * Toastify CSS - Lightweight toast notifications
 * Version: 1.12.0 (Customized for MRC Theme Integration)
 * https://github.com/apvarun/toastify-js
 * MIT License
 */

.toastify {
    padding: 12px 20px;
    color: var(--mrc-toast-text, #fff);
    display: inline-block;
    box-shadow: var(--mrc-toast-shadow, 0 3px 6px -1px rgba(0, 0, 0, 0.12), 0 10px 36px -4px rgba(77, 96, 232, 0.3));
    background: var(--mrc-toast-bg, -webkit-linear-gradient(315deg, #73a5ff, #5477f5));
    background: var(--mrc-toast-bg, linear-gradient(135deg, #73a5ff, #5477f5));
    position: fixed;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.215, 0.61, 0.355, 1);
    border-radius: var(--mrc-border-radius, 6px);
    cursor: pointer;
    text-decoration: none;
    max-width: calc(50% - 20px);
    z-index: 10000;
    font-family: var(--mrc-font-family-base);
    font-size: var(--mrc-toast-font-size, 14px);
    font-weight: var(--mrc-toast-font-weight, 500);
    line-height: 1.4;
    word-wrap: break-word;
}

.toastify.toastify-show {
    opacity: 1;
}

.toastify.toastify-top {
    top: 15px;
    transform: translateY(-100px);
}

.toastify.toastify-top.toastify-show {
    transform: translateY(0);
}

.toastify.toastify-bottom {
    bottom: 15px;
    transform: translateY(100px);
}

.toastify.toastify-bottom.toastify-show {
    transform: translateY(0);
}

.toastify.toastify-left {
    left: 15px;
}

.toastify.toastify-right {
    right: 15px;
}

.toastify.toastify-center {
    margin-left: auto;
    margin-right: auto;
    left: 0;
    right: 0;
    max-width: 300px;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--mrc-toast-close-color, rgba(255, 255, 255, 0.8));
    cursor: pointer;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    float: right;
    margin-left: 15px;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.toast-close:hover,
.toast-close:focus {
    opacity: 1;
    outline: 2px solid var(--mrc-focus-color, rgba(255, 255, 255, 0.5));
    outline-offset: 2px;
}

/* MRC Theme Integration - Toast Types */
.mrc-toast-success {
    background: var(--mrc-success-bg, #28a745) !important;
    color: var(--mrc-success-text, #fff) !important;
}

.mrc-toast-success .toast-close {
    color: var(--mrc-theme-primary, var(--mrc-primary, #c0392b)) !important;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    opacity: 1;
}

.mrc-toast-success .toast-close:hover,
.mrc-toast-success .toast-close:focus {
    background: rgba(255, 255, 255, 1);
    outline: 2px solid var(--mrc-theme-primary, var(--mrc-primary, #c0392b));
}

.mrc-toast-error {
    background: var(--mrc-error-bg, #dc3545) !important;
    color: var(--mrc-error-text, #fff) !important;
}

.mrc-toast-warning {
    background: var(--mrc-warning-bg, #ffc107) !important;
    color: var(--mrc-warning-text, #212529) !important;
}

.mrc-toast-info {
    background: var(--mrc-info-bg, #17a2b8) !important;
    color: var(--mrc-info-text, #fff) !important;
}

/* Fallback Toast Styling (when Toastify library not available) */
.mrc-toast-fallback {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: var(--mrc-border-radius, 6px);
    background: var(--mrc-info-bg, #17a2b8);
    color: var(--mrc-info-text, #fff);
    font-size: var(--mrc-toast-font-size, 14px);
    font-weight: var(--mrc-toast-font-weight, 500);
    box-shadow: var(--mrc-toast-shadow, 0 4px 12px rgba(0,0,0,0.15));
    z-index: 10000;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
    max-width: 300px;
    word-wrap: break-word;
}

.mrc-toast-fallback.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.mrc-toast-fallback--success {
    background: var(--mrc-success-bg, #28a745);
    color: var(--mrc-success-text, #fff);
}

.mrc-toast-fallback--error {
    background: var(--mrc-error-bg, #dc3545);
    color: var(--mrc-error-text, #fff);
}

.mrc-toast-fallback--warning {
    background: var(--mrc-warning-bg, #ffc107);
    color: var(--mrc-warning-text, #212529);
}

.mrc-toast-fallback--info {
    background: var(--mrc-info-bg, #17a2b8);
    color: var(--mrc-info-text, #fff);
}

/* Responsive behavior */
@media (max-width: 768px) {
    .toastify {
        margin-left: 10px;
        margin-right: 10px;
        max-width: calc(100% - 20px);
    }
    
    .mrc-toast-fallback {
        right: 10px;
        left: 10px;
        max-width: none;
        transform: translateY(-100%);
    }
    
    .mrc-toast-fallback.is-visible {
        transform: translateY(0);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .toastify,
    .mrc-toast-fallback {
        border: 2px solid currentColor;
        box-shadow: none;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .toastify,
    .mrc-toast-fallback {
        transition: opacity 0.2s ease;
        transform: none !important;
    }
    
    .toastify.toastify-show,
    .mrc-toast-fallback.is-visible {
        transform: none !important;
    }
}