/*
 * Custom CSS for Doafeer PDF.js Viewer
 * Enhances responsiveness and height across devices.
 */

.df-pdfjs-wrap {
    max-width: 100%;
    margin: 20px auto; /* Centering and adding margin */
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background-color: #f9f9f9; /* Light background for viewer container */
}

.df-pdfjs-frame {
    border: none; /* Remove default iframe border */
    max-width: 100%;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    
    /* Default height for larger screens (Desktop) */
    height: 95vh !important; 
    min-height: 700px !important; 
}

/* Media queries for responsive height */

/* For Tablets (Portrait and Landscape) */
@media (max-width: 1024px) and (min-width: 769px) {
    .df-pdfjs-frame {
        height: 90vh !important;
        min-height: 650px !important;
    }
}

/* For Mobile Devices (Portrait) */
@media (max-width: 768px) {
    .df-pdfjs-frame {
        height: 85vh !important; 
        min-height: 550px !important; 
        border-radius: 4px;
    }
    .df-pdfjs-wrap {
        margin: 10px auto;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
}

/* For Smaller Mobile Devices */
@media (max-width: 480px) {
    .df-pdfjs-frame {
        height: 80vh !important;
        min-height: 450px !important;
    }
}

/* For Extra Large Screens */
@media (min-width: 1600px) {
    .df-pdfjs-frame {
        height: 90vh !important;
        min-height: 850px !important;
        max-width: 1400px; /* Optional: Limit max width on very large screens */
    }
}

/* Hover effect for a more interactive feel */
.df-pdfjs-frame:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    transition: box-shadow 0.3s ease-in-out;
}

/* Loading state visual feedback */
.df-pdfjs-frame[loading="lazy"] {
    background: #e0e0e0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='20' fill='none' stroke='%23999' stroke-width='3'/%3E%3Cpath d='M50 30 L50 20 M50 80 L50 70 M30 50 L20 50 M80 50 L70 50' stroke='%23999' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50px 50px;
}


