.afpwa-skeleton-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.afpwa-skeleton {
    background-color: #e2e5e7;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
    display: block;
    min-height: 16px;
    width: 100%;
}

.afpwa-skeleton-title {
    height: 28px;
    border-radius: 4px;
    max-width: 60%;
}

.afpwa-skeleton-text {
    height: 16px;
    border-radius: 3px;
}

.afpwa-skeleton-text:last-child {
    max-width: 70%;
}

.afpwa-skeleton-card {
    height: 160px;
    border-radius: 10px;
}

.afpwa-skeleton-image {
    height: 240px;
    border-radius: 8px;
}

.afpwa-skeleton-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.afpwa-skeleton-list {
    height: 48px;
    border-radius: 6px;
}

.afpwa-skeleton-article {
    height: 320px;
    border-radius: 12px;
}

.afpwa-skeleton-animated::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.6) 50%, transparent 100%);
    animation: afpwa-skeleton-shimmer 1.4s infinite;
}

@keyframes afpwa-skeleton-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.afpwa-skeleton-wrapper[data-animation="pulse"] .afpwa-skeleton-animated {
    animation: afpwa-skeleton-pulse 1.5s ease-in-out infinite;
}

.afpwa-skeleton-wrapper[data-animation="pulse"] .afpwa-skeleton-animated::after {
    display: none;
}

@keyframes afpwa-skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.4;
    }
}

/* Card composition */
.afpwa-skeleton-card-layout {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px;
    border: 1px solid #e2e5e7;
    border-radius: 10px;
}

.afpwa-skeleton-card-layout .afpwa-skeleton-circle {
    flex: 0 0 auto;
}

.afpwa-skeleton-card-layout .afpwa-skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

@media (prefers-color-scheme: dark) {
    .afpwa-skeleton {
        background-color: #2b2b2b;
    }
    .afpwa-skeleton-animated::after {
        background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    }
    .afpwa-skeleton-card-layout {
        border-color: #2b2b2b;
    }
}

/* Utility for hiding skeleton after content loads */
.afpwa-skeleton-hidden {
    display: none !important;
}
