/**
 * Skeleton Loading Components
 * Modern skeleton loading placeholders with shimmer effect
 */

/* ========================================
   Base Skeleton Styles
   ======================================== */

.skeleton {
    background: linear-gradient(90deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
    border-radius: 6px;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   Skeleton Elements
   ======================================== */

.skeleton-text {
    height: 16px;
}

.skeleton-text--title {
    height: 24px;
    width: 70%;
    margin-bottom: 12px;
}

.skeleton-text--subtitle {
    height: 20px;
    width: 50%;
    margin-bottom: 8px;
}

.skeleton-text--small {
    height: 14px;
    width: 40%;
}

.skeleton-text--full {
    width: 100%;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e5e5e5 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.skeleton-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    display: block;
}

.skeleton-badge {
    width: 60px;
    height: 24px;
    border-radius: 999px;
}

.skeleton-button {
    width: 120px;
    height: 40px;
    border-radius: 4px;
}

.skeleton-button--small {
    width: 80px;
    height: 32px;
}

.skeleton-tag {
    width: 70px;
    height: 16px;
    border-radius: 4px;
}

/* ========================================
   Skeleton Card - RFQ
   ======================================== */

.skeleton-rfq-card {
    box-sizing: border-box;
    background: var(--bg-white, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    gap: 0;
    height: 300px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.skeleton-rfq-card__main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-right: 1px solid var(--border-color-light, #f0f0f0);
    padding-right: 36px;
    min-width: 0;
    overflow: hidden;
}

.skeleton-rfq-card__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    height: auto;
}

.skeleton-rfq-card__header-left {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
}

.skeleton-rfq-card__badges {
    display: flex;
    gap: 12px;
    align-items: start;
    margin-bottom: 0;
}

.skeleton-rfq-card__title {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.skeleton-rfq-card__description {
    background: var(--bg-blue-light, #f0f7ff);
    padding: 10px 12px;
    height: 140px;
    max-height: 140px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    overflow: hidden;
}

.skeleton-rfq-card__details-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-height: 40px;
}

.skeleton-rfq-card__details {
    flex: 1;
    margin: 0;
    padding: 0;
}

.skeleton-rfq-card__details ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.skeleton-rfq-card__details li {
    margin-bottom: 2px;
    line-height: 1.2;
}

.skeleton-rfq-card__details li:last-child {
    margin-bottom: 0;
}

.skeleton-rfq-card__tags {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    column-gap: 8px;
    flex-shrink: 0;
    min-height: 18px;
}

.skeleton-rfq-card__actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.skeleton-rfq-card__profile {
    width: 258px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding-left: 20px;
    padding-right: 12px;
    padding-top: 20px;
    align-items: center;
    height: 100%;
    overflow: hidden;
}

.skeleton-rfq-card__profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    width: 100%;
}

.skeleton-rfq-card__profile-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.skeleton-rfq-card__profile-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin-top: 4px;
}

.skeleton-rfq-card__profile-contact > div {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ========================================
   Skeleton Card - Product
   ======================================== */

.skeleton-product-card {
    box-sizing: border-box;
    background: var(--bg-white, #ffffff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    height: 300px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.skeleton-product-card__wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    height: 100%;
}

.skeleton-product-card__body {
    display: flex;
    align-items: stretch;
    flex: 1;
    gap: 0;
}

.skeleton-product-card__left {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    border-right: 1px solid #f0f0f0;
    padding-right: 36px;
}

.skeleton-product-card__content-row {
    display: flex;
    gap: 12px;
    flex: 1;
}

.skeleton-product-card__gallery {
    width: 206px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-product-card__gallery-main {
    height: 184px;
    background: #f8f8f8;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.skeleton-product-card__gallery .skeleton-image {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e5e5e5 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.skeleton-product-card__gallery-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 auto;
    gap: 16px;
}

.skeleton-product-card__gallery-nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 24px;
    flex-shrink: 0;
}

.skeleton-product-card__gallery-nav-btn.prev {
    background: linear-gradient(90deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.skeleton-product-card__gallery-nav-btn.next {
    background: linear-gradient(90deg, #e8e8e8 25%, #d0d0d0 50%, #e8e8e8 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.skeleton-product-card__gallery-counter {
    width: 30px;
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.8s ease-in-out infinite;
}

.skeleton-product-card__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.skeleton-product-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.skeleton-product-card__badges {
    display: flex;
    gap: 12px;
    flex-wrap: nowrap;
    margin-bottom: 0;
}

.skeleton-product-card__price {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.skeleton-product-card__features {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 100px;
    overflow: hidden;
}

.skeleton-product-card__actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
    border-top: 1px solid #f5f5f5;
    padding-top: 12px;
}

.skeleton-product-card__tags {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    column-gap: 8px;
    flex-shrink: 0;
    min-height: 18px;
}

.skeleton-product-card__tag {
    width: 70px;
    height: 16px;
    border-radius: 4px;
}

.skeleton-product-card__profile {
    width: 258px;
    flex-shrink: 0;
    max-width: 328px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 100%;
    overflow: hidden;
}

.skeleton-product-card__profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.skeleton-product-card__profile-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.skeleton-product-card__profile-contact {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    align-items: center;
}

.skeleton-product-card__profile-contact > div {
    display: flex;
    gap: 8px;
    align-items: center;
    width: 100%;
    justify-content: center;
}

/* ========================================
   Skeleton List Container
   ======================================== */

.skeleton-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.skeleton-list--grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 1024px) {
    .skeleton-rfq-card,
    .skeleton-product-card {
        flex-direction: column;
    }

    .skeleton-rfq-card__profile,
    .skeleton-product-card__profile {
        width: 100%;
    }

    .skeleton-product-card__left {
        flex-direction: column;
    }

    .skeleton-product-card__gallery {
        width: 100%;
        max-width: 300px;
    }

    .skeleton-product-card__gallery-main {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .skeleton-rfq-card,
    .skeleton-product-card {
        padding: 16px;
    }

    .skeleton-rfq-card__actions,
    .skeleton-product-card__actions {
        flex-wrap: wrap;
    }
}

