/**
 * Enhanced Skeleton Loader for Quick View
 *
 * @package viasun
 */

/* Enhanced Skeleton Loader */
.templines-qv-skeleton {
    display: none;
    width: 100%;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
}

.templines-qv-skeleton-wrapper {
    display: flex;
    width: 100%;
    gap: 30px;
}

/* Enhanced Image Skeleton */
.templines-qv-skeleton-image {
    width: 400px;
    height: 400px;
    background-color: #f0f0f0;
    border-radius: 8px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

/* Image Skeleton Shine Effect */
.templines-qv-skeleton-image::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

/* Enhanced Slider Navigation Skeleton */
.templines-qv-skeleton-navigation {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    pointer-events: none;
}

.templines-qv-skeleton-nav-button {
    width: 40px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

/* Enhanced Content Skeleton */
.templines-qv-skeleton-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.templines-qv-skeleton-title {
    height: 32px;
    width: 70%;
    background-color: #f0f0f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.templines-qv-skeleton-price {
    height: 24px;
    width: 30%;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.templines-qv-skeleton-description {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.templines-qv-skeleton-line {
    height: 16px;
    width: 100%;
    background-color: #f0f0f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.templines-qv-skeleton-line:nth-child(2) {
    width: 95%;
}

.templines-qv-skeleton-line:last-child {
    width: 80%;
}

.templines-qv-skeleton-cart {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.templines-qv-skeleton-quantity {
    height: 48px;
    width: 60px;
    background-color: #f0f0f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.templines-qv-skeleton-button {
    height: 48px;
    width: 150px;
    background-color: #f0f0f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

/* Enhanced Shimmer Animation */
@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.templines-qv-skeleton-title::after,
.templines-qv-skeleton-price::after,
.templines-qv-skeleton-line::after,
.templines-qv-skeleton-quantity::after,
.templines-qv-skeleton-button::after,
.templines-qv-skeleton-nav-button::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.2) 20%,
        rgba(255, 255, 255, 0.5) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 2s infinite;
}

/* Fade Transition */
.templines-qv-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.templines-qv-fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Responsive Skeleton */
@media (max-width: 767px) {
    .templines-qv-skeleton-wrapper {
        flex-direction: column;
    }
    
    .templines-qv-skeleton-image {
        width: 100%;
        height: 300px;
    }
}
