/**
 * Responsive Utilities
 * 
 * Media queries for toast responsiveness across devices.
 * Includes accessibility (reduced motion) and retina display support.
 * 
 * @package    Toastifier
 * @subpackage Utilities
 * @version    2.0.0
 */

/* ═══════════════════════════════════════════════════════════
   Mobile (< 768px)
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) {
    #toastifier-toast-container,
    #toastifier-container {
        top: 20px;
        bottom: auto;
        right: 15px;
        left: 15px;
        width: auto;
    }
    
    .toastifier-toast {
        width: 100%;
        padding: 14px 16px;
        border-radius: 12px;
        border-width: 1.6px;
    }
    
    .toastifier-toast-icon {
        width: 36px;
        height: 36px;
        margin-right: 8px;
    }
    
    .toastifier-toast-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .toastifier-toast-content {
        max-width: calc(100% - 88px);
    }
    
    .toastifier-toast-title {
        font-size: 14px;
    }
    
    .toastifier-toast-message {
        font-size: 13px;
        line-height: 1.4;
        max-height: calc(1.4em * 2);
    }
    
    .toastifier-toast-close {
        width: 24px;
        height: 24px;
        margin-left: 8px;
    }
}

/* ═══════════════════════════════════════════════════════════
   Tablet (768px - 1024px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 768px) and (max-width: 1024px) {
    #toastifier-toast-container,
    #toastifier-container {
        top: 80px;
        right: 32px;
        width: 420px;
    }
    
    .toastifier-toast {
        padding: 15px 18px;
        border-radius: 14px;
    }
    
    .toastifier-toast-icon {
        width: 38px;
        height: 38px;
        margin-right: 12px;
    }
    
    .toastifier-toast-icon svg {
        width: 22px;
        height: 22px;
    }
    
    .toastifier-toast-content {
        max-width: calc(100% - 96px);
    }
    
    .toastifier-toast-title {
        font-size: 14.5px;
    }
    
    .toastifier-toast-message {
        font-size: 13.5px;
    }
}

/* ═══════════════════════════════════════════════════════════
   Small Desktop (1025px - 1280px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1025px) and (max-width: 1280px) {
    #toastifier-toast-container,
    #toastifier-container {
        top: 88px;
        right: 40px;
        width: 450px;
    }
    
    .toastifier-toast {
        padding: 15px 19px;
        border-radius: 15px;
    }
    
    .toastifier-toast-icon {
        width: 39px;
        height: 39px;
        margin-right: 12px;
    }
    
    .toastifier-toast-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .toastifier-toast-content {
        max-width: calc(100% - 98px);
    }
}

/* ═══════════════════════════════════════════════════════════
   Medium Desktop (1281px - 1440px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1281px) and (max-width: 1440px) {
    #toastifier-toast-container,
    #toastifier-container {
        top: 92px;
        right: 44px;
        width: 460px;
    }
    
    .toastifier-toast {
        padding: 16px 20px;
        border-radius: 16px;
    }
    
    .toastifier-toast-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .toastifier-toast-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .toastifier-toast-content {
        max-width: calc(100% - 102px);
    }
}

/* ═══════════════════════════════════════════════════════════
   Large Desktop (1441px - 1920px) - DEFAULT
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1441px) and (max-width: 1920px) {
    #toastifier-toast-container,
    #toastifier-container {
        top: 96px;
        right: 48px;
        width: 472px;
    }
    
    .toastifier-toast {
        padding: 16px 20px;
        border-radius: 16px;
    }
    
    .toastifier-toast-icon {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .toastifier-toast-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .toastifier-toast-content {
        max-width: calc(100% - 102px);
    }
    
    .toastifier-toast-title {
        font-size: 15px;
    }
    
    .toastifier-toast-message {
        font-size: 14px;
    }
}

/* ═══════════════════════════════════════════════════════════
   Ultra-Wide (> 1920px)
   ═══════════════════════════════════════════════════════════ */
@media (min-width: 1921px) {
    #toastifier-toast-container,
    #toastifier-container {
        top: 100px;
        right: 60px;
        width: 500px;
    }
    
    .toastifier-toast {
        padding: 16px 18px;
        border-radius: 16px;
    }
    
    .toastifier-toast-icon {
        width: 42px;
        height: 42px;
        margin-right: 18px;
    }
    
    .toastifier-toast-icon svg {
        width: 26px;
        height: 26px;
    }
    
    .toastifier-toast-content {
        max-width: calc(100% - 108px);
    }
    
    .toastifier-toast-title {
        font-size: 16px;
    }
    
    .toastifier-toast-message {
        font-size: 15px;
    }
    
    .toastifier-toast-close {
        width: 30px;
        height: 30px;
        margin-left: 12px;
    }
}

/* ═══════════════════════════════════════════════════════════
   Mobile Landscape
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 767px) and (orientation: landscape) {
    #toastifier-toast-container,
    #toastifier-container {
        top: 15px;
        width: calc(100% - 30px);
        max-width: 400px;
    }
    
    .toastifier-toast {
        padding: 12px 16px;
    }
    
    .toastifier-toast-message {
        max-height: calc(1.3em * 1);
        -webkit-line-clamp: 1;
    }
}

/* ═══════════════════════════════════════════════════════════
   Accessibility: Reduced Motion (WCAG 2.1)
   ═══════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .toastifier-toast,
    .toastifier-toast-show,
    .toastifier-toast-hide {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
    }
    
    .toastifier-toast::after {
        animation-duration: 0.01ms !important;
    }
    
    .toastifier-toast:hover {
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════
   Retina Display Optimization
   ═══════════════════════════════════════════════════════════ */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .toastifier-toast {
        backdrop-filter: blur(8px) saturate(180%);
        -webkit-backdrop-filter: blur(8px) saturate(180%);
    }
}
