/**
 * 加载提示样式
 * 用于智能咨询功能的加载动画和骨架屏
 */

.loading-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 24px 32px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    z-index: 10000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-toast span {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

/* ==================== 骨架屏样式 ==================== */

/* 产品卡片骨架屏 */
.product-card-skeleton {
    position: relative;
    width: 100%;
    padding-bottom: 130.13%; /* 保持与产品卡片相同的宽高比 (501/385) */
    background: url('../../ui/Card-BG.webp') no-repeat center center;
    background-size: contain;
    overflow: hidden;
    cursor: default;
}

.product-card-skeleton .skeleton-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 骨架屏图片区域 - 与 .product-image 完全一致 */
.product-card-skeleton .skeleton-image {
    width: calc(100% - 4px);
    padding-bottom: 75%; /* 16:12比例，与产品图片一致 */
    margin: 10px 1px 1px 2px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    position: relative;
}

/* 骨架屏内容区域 - 与 .product-content 完全一致 */
.product-card-skeleton .skeleton-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
    gap: 0;
}

/* 骨架屏头部区域 - 与 .product-header 完全一致，flex: 8 */
.product-card-skeleton .skeleton-header {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-xs);
    padding: 0 var(--spacing-sm);
    flex: 8; /* 占8份，与产品卡片一致 */
    justify-content: space-between;
}

.product-card-skeleton .skeleton-title {
    width: 80%;
    height: 20px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.product-card-skeleton .skeleton-price {
    width: 60%;
    height: 18px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    align-self: flex-end; /* 右对齐，与价格一致 */
}

/* 骨架屏底部区域 - 与 .product-stats 完全一致，flex: 2 */
.product-card-skeleton .skeleton-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* 底部对齐，与产品统计区一致 */
    margin-top: var(--spacing-xs);
    padding: var(--spacing-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    gap: var(--spacing-sm);
    flex: 2; /* 占2份，与产品卡片一致 */
}

.product-card-skeleton .skeleton-tag {
    width: 40px;
    height: 20px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

.product-card-skeleton .skeleton-stat {
    width: 80px;
    height: 14px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

/* 招募卡片骨架屏 */
.recruit-card-skeleton {
    background: linear-gradient(145deg, rgba(3, 75, 42, 0.6), rgba(2, 37, 23, 0.8));
    border: 1px solid rgba(15, 247, 150, 0.3);
    border-radius: var(--border-radius-lg);
    padding: var(--margin-xl) var(--margin-xxl);
    margin-bottom: var(--margin-sm);
}

.recruit-card-skeleton .skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--margin-xl);
}

.recruit-card-skeleton .skeleton-title {
    width: 60%;
    height: 24px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.recruit-card-skeleton .skeleton-tag {
    width: 40px;
    height: 24px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

.recruit-card-skeleton .skeleton-info {
    margin-bottom: var(--margin-xl);
}

.recruit-card-skeleton .skeleton-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--margin-lg);
}

.recruit-card-skeleton .skeleton-label {
    width: 30%;
    height: 16px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.recruit-card-skeleton .skeleton-value {
    width: 50%;
    height: 16px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
}

.recruit-card-skeleton .skeleton-actions {
    display: flex;
    gap: var(--margin-lg);
    justify-content: flex-end;
}

.recruit-card-skeleton .skeleton-button {
    width: 120px;
    height: 40px;
    background: linear-gradient(90deg, #1a1f2a 25%, #2a3040 50%, #1a1f2a 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

/* 骨架屏闪烁动画 */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* 加载中文字提示 */
.loading-placeholder {
    text-align: center;
    padding: var(--padding-xl);
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-lg);
}

.loading-placeholder .loading-spinner-inline {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(15, 247, 150, 0.3);
    border-top-color: #0ff796;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: var(--spacing-sm);
    vertical-align: middle;
}
