/* Skeleton Loader Styles for iYi Elements Widgets */

/* Base skeleton animation */
@keyframes iyi-skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.iyi-skeleton-wrapper {
    position: relative;
}

.iyi-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: iyi-skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

/* Show skeleton by default, hide when content is loaded */
.iyi-skeleton-wrapper .iyi-skeleton {
    display: block;
}

.iyi-skeleton-wrapper .iyi-skeleton-content {
    display: none;
}

.iyi-skeleton-wrapper:not(.loading) .iyi-skeleton {
    display: none;
}

.iyi-skeleton-wrapper:not(.loading) .iyi-skeleton-content {
    display: block;
}

/* Event Breadcrumb Skeleton */
.iyi-event-breadcrumb-skeleton {
    display: flex;
    align-items: center;
    gap: 8px;
}

.iyi-event-breadcrumb-skeleton .skeleton-link {
    height: 20px;
    width: 80px;
}

.iyi-event-breadcrumb-skeleton .skeleton-separator {
    height: 16px;
    width: 20px;
}

.iyi-event-breadcrumb-skeleton .skeleton-title {
    height: 20px;
    width: 200px;
}

/* Event Display Skeleton */
.iyi-event-display-skeleton {
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fff;
}

.iyi-event-display-skeleton .skeleton-title {
    height: 28px;
    width: 70%;
    margin-bottom: 20px;
}

.iyi-event-display-skeleton .skeleton-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.iyi-event-display-skeleton .skeleton-info-item {
    height: 20px;
    width: 200px;
}

.iyi-event-display-skeleton .skeleton-excerpt {
    height: 16px;
    width: 90%;
    margin-bottom: 8px;
}

.iyi-event-display-skeleton .skeleton-excerpt:nth-child(2) {
    width: 70%;
}

.iyi-event-display-skeleton .skeleton-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.iyi-event-display-skeleton .skeleton-button {
    height: 40px;
    width: 120px;
}

/* Event Image Skeleton */
.iyi-event-image-skeleton {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
}

.iyi-event-image-skeleton .skeleton-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: iyi-skeleton-loading 1.5s ease-in-out infinite;
}

.iyi-event-image-skeleton .skeleton-video-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: iyi-skeleton-loading 1.5s ease-in-out infinite;
}

/* Event Gallery Skeleton */
.iyi-event-gallery-skeleton {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.iyi-event-gallery-skeleton .skeleton-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
}

@media (max-width: 768px) {
    .iyi-event-gallery-skeleton {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .iyi-event-gallery-skeleton {
        grid-template-columns: 1fr;
    }
}

/* Event Content Skeleton */
.iyi-event-content-skeleton {
    padding: 20px;
}

.iyi-event-content-skeleton .skeleton-description {
    height: 16px;
    width: 100%;
    margin-bottom: 12px;
}

.iyi-event-content-skeleton .skeleton-description:nth-child(2) {
    width: 95%;
}

.iyi-event-content-skeleton .skeleton-description:nth-child(3) {
    width: 90%;
}

.iyi-event-content-skeleton .skeleton-subscribe {
    height: 40px;
    width: 150px;
    margin-top: 20px;
    border-radius: 4px;
}

.iyi-event-content-skeleton .skeleton-meta {
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.iyi-event-content-skeleton .skeleton-meta-section {
    flex: 1;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.iyi-event-content-skeleton .skeleton-meta-title {
    height: 20px;
    width: 100px;
    margin-bottom: 15px;
}

.iyi-event-content-skeleton .skeleton-meta-item {
    height: 16px;
    width: 80%;
    margin-bottom: 10px;
}

/* Event Navigation Skeleton */
.iyi-event-navigation-skeleton {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.iyi-event-navigation-skeleton .skeleton-nav-item {
    height: 40px;
    width: 150px;
    border-radius: 4px;
}

.iyi-event-navigation-skeleton .skeleton-nav-item.prev {
    text-align: left;
}

.iyi-event-navigation-skeleton .skeleton-nav-item.next {
    text-align: right;
    margin-left: auto;
}

@media (max-width: 768px) {
    .iyi-event-navigation-skeleton {
        flex-direction: column;
        gap: 15px;
    }
    
    .iyi-event-navigation-skeleton .skeleton-nav-item {
        width: 100%;
    }
}

/* Posts Load More Skeleton */
.iyi-posts-skeleton-wrapper.iyi-skeleton-wrapper {
    display: grid;
    gap: 16px;
    margin: 20px 0;
}
@media (min-width: 768px) {
    .iyi-posts-skeleton-wrapper.iyi-skeleton-wrapper {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1200px) {
    .iyi-posts-skeleton-wrapper.iyi-skeleton-wrapper {
        grid-template-columns: repeat(3, 1fr);
    }
}
.iyi-posts-skeleton-wrapper .iyi-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    position: relative;
}
.iyi-posts-skeleton-wrapper .iyi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
.iyi-posts-skeleton-wrapper .iyi-card .thumb.iyi-skeleton-image {
    height: 200px;
    border-radius: 0;
    margin: 0;
    background-color: #f0f0f0;
}
.iyi-posts-skeleton-wrapper .iyi-card .content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.iyi-posts-skeleton-wrapper .iyi-card .content .iyi-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}
.iyi-posts-skeleton-wrapper .iyi-card .content .iyi-skeleton-line {
    background-color: #e0e0e0;
    border-radius: 4px;
    height: 16px;
}
.iyi-posts-skeleton-wrapper .iyi-card .content .iyi-skeleton-line.short {
    width: 40%;
}
.iyi-posts-skeleton-wrapper .iyi-card .content .iyi-skeleton-line.medium {
    width: 60%;
}
.iyi-posts-skeleton-wrapper .iyi-card .content .iyi-skeleton-line.full {
    width: 100%;
}
.iyi-posts-skeleton-wrapper .iyi-card .content .skeleton-title {
    height: 24px;
    width: 70%;
    margin-bottom: 10px;
    background-color: #e0e0e0;
    border-radius: 4px;
}
.iyi-posts-skeleton-wrapper .iyi-card .content .featured-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.iyi-posts-skeleton-wrapper .iyi-card .content .readmore-col {
    margin-top: 10px;
}
.iyi-posts-skeleton-wrapper .iyi-card .content .readmore-col .iyi-skeleton-button {
    height: 36px;
    width: 120px;
    background-color: #e0e0e0;
    border-radius: 4px;
}

/* Team Listing Skeleton */
.iyi-team-listing-skeleton-wrapper.iyi-skeleton-wrapper {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 20px;
    margin: 20px 0;
}

@media (min-width: 768px) {
    .iyi-team-listing-skeleton-wrapper.iyi-skeleton-wrapper {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .iyi-team-listing-skeleton-wrapper.iyi-skeleton-wrapper {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 480px) {
    .iyi-team-listing-skeleton-wrapper.iyi-skeleton-wrapper {
        grid-template-columns: 1fr !important;
    }
}

.iyi-team-listing-skeleton-wrapper .iyi-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.iyi-team-listing-skeleton-wrapper .iyi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: shimmer 1.5s infinite;
    z-index: 1;
}

.iyi-team-listing-skeleton-wrapper .iyi-card .thumb.iyi-skeleton-image {
    height: 200px;
    border-radius: 12px 12px 0 0;
    margin: 0;
    background-color: #f0f0f0;
    position: relative;
    z-index: 0;
}

.iyi-team-listing-skeleton-wrapper .iyi-card .content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    z-index: 0;
    justify-content: center;
    align-items: center;
}

.iyi-team-listing-skeleton-wrapper .iyi-card .content .iyi-skeleton-line {
    height: 16px;
    background-color: #f0f0f0;
    border-radius: 4px;
}

.iyi-team-listing-skeleton-wrapper .iyi-card .content .iyi-skeleton-line.medium {
    width: 70%;
}

.iyi-team-listing-skeleton-wrapper .iyi-card .content .iyi-skeleton-line.short {
    width: 50%;
}

.iyi-team-listing-skeleton-wrapper .iyi-card .content .skeleton-title {
    height: 20px;
    width: 80%;
    margin-bottom: 8px;
}

