/**
 * Skeleton Loader for Tour Cards
 *
 * Provides shimmer loading placeholders while AJAX category filtering loads
 * Matches dimensions of actual tour cards from grid.php
 *
 * @package Traveler
 * @since 1.0.0
 */

/* Skeleton Container - Not needed since we use Bootstrap col classes in JS */
/* The skeleton cards use col-lg-3 col-md-6 mb-4 which gives:
   - Desktop (lg): 4 columns (12/3 = 4)
   - Tablet (md): 2 columns (12/6 = 2)
   - Mobile: 1 column (col-12 default)
*/

/* Ensure skeleton columns respect grid layout */
.row.service-list-wrapper > .col-lg-3.item-service .pca-skeleton-card,
#pca-tours-grid > .col-lg-3.item-service .pca-skeleton-card {
    max-width: 100%;
    box-sizing: border-box;
}

/* Individual Skeleton Card */
.pca-skeleton-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Skeleton Image */
.pca-skeleton-image {
    width: 100%;
    height: 220px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Skeleton Content */
.pca-skeleton-content {
    padding: 16px;
}

/* Skeleton Title */
.pca-skeleton-title {
    height: 20px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
    width: 80%;
}

/* Skeleton Meta Row */
.pca-skeleton-meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.pca-skeleton-meta-item {
    height: 14px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    flex: 1;
}

/* Skeleton Price */
.pca-skeleton-price {
    height: 24px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 12px;
    width: 60%;
}

/* Skeleton Button */
.pca-skeleton-button {
    height: 40px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* Shimmer Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.pca-tours-loading {
    opacity: 0.6;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

/* Accessibility */
.pca-skeleton-card[aria-busy="true"] {
    /* Visual indicator for loading state */
}

/* Screen Reader Only Text */
.pca-loading-announcement {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Smooth Transitions */
.pca-tours-fade-out {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.pca-tours-fade-in {
    animation: fadeIn 0.4s ease;
}

/* Mobile Optimizations */
@media (max-width: 767px) {
    .pca-skeleton-grid {
        gap: 16px;
    }

    .pca-skeleton-image {
        height: 200px;
    }
}
