/* Container Logic */
#ajp-preloader {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: none; /* Controlled by JS */
    padding: 20px;
    z-index: 998;
    overflow: hidden;
    pointer-events: none;
}

/* The Skeleton Wrapper */
.ajp-skeleton-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Individual Bone Styling */
.skeleton-bone {
    background: #2a2a2a;
    background-image: linear-gradient(
        90deg, 
        #2a2a2a 0px, 
        #3a3a3a 40px, 
        #2a2a2a 80px
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 8px;
    margin-bottom: 15px;
}

@keyframes shimmer {
    0% { background-position: -100% 0; }
    100% { background-position: 100% 0; }
}

/* Skeleton Shapes */
.skeleton-title { height: 32px; width: 60%; }
.skeleton-media { height: 200px; width: 100%; }
.skeleton-text { height: 14px; width: 100%; }
.skeleton-text.short { width: 40%; }

/* Hide page content logic */
.ajp-hide-content {
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease-in-out !important;
    pointer-events: none !important;
}

/* Responsive visibility */
@media (max-width: 768px) {
    .desktop-only { display: none; }
    .ajp-skeleton-wrapper { grid-template-columns: 1fr; }
}