/**
 * Mobile Compatibility Fixes
 * Add to assets/css/mobile-compatibility.css
 */

/* iOS Safari Fixes */
@supports (-webkit-appearance: none) {
    .magicblog-engagement-buttons button {
        -webkit-appearance: none;
        border-radius: 6px;
    }
    
    .magicblog-rating input[type="radio"] {
        -webkit-appearance: none;
        width: 20px;
        height: 20px;
    }
}

/* Touch-friendly sizing */
@media (hover: none) and (pointer: coarse) {
    .magicblog-engagement-buttons button {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .magicblog-rating .star {
        min-width: 44px;
        min-height: 44px;
        font-size: 24px;
    }
    
    .magicblog-views-counter {
        padding: 8px 12px;
        font-size: 16px;
    }
}

/* Android Chrome fixes */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .magicblog-post-grid {
        transform: translateZ(0); /* Hardware acceleration */
    }
    
    .magicblog-carousel-container {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .magicblog-rating .star {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Landscape orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .magicblog-post-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .magicblog-post-grid .post-item,
    .magicblog-carousel-slide,
    .magicblog-rating .star {
        transition: none;
        animation: none;
    }
}