/**
 * Vavoom MyPage - Skeleton Loading UI
 * 스켈레톤 로딩 스타일
 */

/* ==============================================
   스켈레톤 기본 애니메이션
   ============================================== */

@keyframes skeleton-loading {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200px 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

.skeleton-shimmer {
    background: 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)
    );
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* ==============================================
   대시보드 스켈레톤
   ============================================== */

.vavoom-skeleton-dashboard {
    padding: 20px;
}

/* 사용자 정보 스켈레톤 */
.skeleton-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
}

.skeleton-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.skeleton-user-details {
    flex: 1;
}

.skeleton-name {
    width: 120px;
    height: 20px;
    margin-bottom: 8px;
}

.skeleton-email {
    width: 200px;
    height: 16px;
    margin-bottom: 8px;
}

.skeleton-level {
    width: 80px;
    height: 14px;
}

/* 퀵 스탯 스켈레톤 */
.skeleton-quick-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.skeleton-stat-card {
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    text-align: center;
}

.skeleton-stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border-radius: 50%;
}

.skeleton-stat-value {
    width: 60px;
    height: 24px;
    margin: 0 auto 8px;
}

.skeleton-stat-label {
    width: 80px;
    height: 14px;
    margin: 0 auto;
}

/* 최근 주문 스켈레톤 */
.skeleton-recent-orders {
    margin-bottom: 30px;
}

.skeleton-section-title {
    width: 120px;
    height: 20px;
    margin-bottom: 16px;
}

.skeleton-order-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    margin-bottom: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.skeleton-product-image {
    width: 50px;
    height: 50px;
    border-radius: 6px;
}

.skeleton-order-details {
    flex: 1;
}

.skeleton-order-number {
    width: 100px;
    height: 16px;
    margin-bottom: 6px;
}

.skeleton-order-date {
    width: 80px;
    height: 14px;
    margin-bottom: 6px;
}

.skeleton-order-total {
    width: 70px;
    height: 14px;
}

.skeleton-order-status {
    width: 60px;
    height: 24px;
    border-radius: 12px;
}

/* ==============================================
   주문 목록 스켈레톤
   ============================================== */

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

.skeleton-order-card {
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
}

.skeleton-order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.skeleton-order-id {
    width: 120px;
    height: 18px;
}

.skeleton-order-products {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.skeleton-product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 6px;
}

.skeleton-order-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.skeleton-action-btn {
    width: 80px;
    height: 32px;
    border-radius: 6px;
}

/* ==============================================
   포인트 내역 스켈레톤
   ============================================== */

.skeleton-point-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
}

.skeleton-point-balance {
    width: 150px;
    height: 32px;
}

.skeleton-point-change {
    width: 100px;
    height: 20px;
}

.skeleton-point-history {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.skeleton-point-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
}

.skeleton-point-desc {
    width: 200px;
    height: 16px;
}

.skeleton-point-amount {
    width: 80px;
    height: 16px;
}

.skeleton-point-date {
    width: 100px;
    height: 14px;
}

/* ==============================================
   쿠폰 목록 스켈레톤
   ============================================== */

.skeleton-coupon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.skeleton-coupon-card {
    padding: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
}

.skeleton-coupon-title {
    width: 150px;
    height: 18px;
    margin-bottom: 12px;
}

.skeleton-coupon-discount {
    width: 100px;
    height: 24px;
    margin-bottom: 12px;
}

.skeleton-coupon-condition {
    width: 200px;
    height: 14px;
    margin-bottom: 8px;
}

.skeleton-coupon-expire {
    width: 120px;
    height: 14px;
}

/* ==============================================
   탭 컨테이너 스켈레톤
   ============================================== */

.skeleton-tabs {
    margin-bottom: 20px;
}

.skeleton-tab-list {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 20px;
}

.skeleton-tab {
    width: 80px;
    height: 40px;
    border-radius: 6px 6px 0 0;
}

.skeleton-tab-content {
    min-height: 400px;
}

/* ==============================================
   반응형 스켈레톤
   ============================================== */

@media (max-width: 768px) {
    .skeleton-quick-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .skeleton-user-info {
        flex-direction: column;
        text-align: center;
    }
    
    .skeleton-order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .skeleton-order-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .skeleton-point-summary {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
    
    .skeleton-coupon-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .vavoom-skeleton-dashboard {
        padding: 12px;
    }
    
    .skeleton-quick-stats {
        grid-template-columns: 1fr;
    }
    
    .skeleton-order-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .skeleton-order-details {
        width: 100%;
    }
}

/* ==============================================
   스켈레톤 페이드 아웃 효과
   ============================================== */

.skeleton-fade-out {
    opacity: 0.5;
    transition: opacity 0.1s ease-out;
}

.skeleton-fade-in {
    opacity: 1;
    transition: opacity 0.2s ease-in;
}

/* 스켈레톤에서 실제 컨텐츠로 전환 */
.skeleton-to-content {
    animation: skeletonToContent 0.2s ease-out forwards;
}

@keyframes skeletonToContent {
    0% {
        opacity: 0.8;
    }
    100% {
        opacity: 1;
    }
}