/**
 * SCREEN 2C - PROGRESSIVE LOADING STYLES
 * Skeleton cards, shimmer animations, and progress counter for authority upgrade
 * @version 1.0.0
 */

/* ============================================================================
   SKELETON CARDS
   ============================================================================ */

.s2c-skeleton-card,
.enh-skeleton-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
    opacity: 0;
    animation: s2cFadeInCard 0.3s ease forwards;
}

.s2c-skeleton-line,
.enh-skeleton-line {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: s2cShimmer 1.5s ease infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.s2c-skeleton-line:last-child,
.enh-skeleton-line:last-child {
    margin-bottom: 0;
}

.s2c-skeleton-badge,
.enh-skeleton-badge {
    background: linear-gradient(90deg,
        rgba(255, 255, 255, 0.04) 25%,
        rgba(255, 255, 255, 0.08) 50%,
        rgba(255, 255, 255, 0.04) 75%);
    background-size: 200% 100%;
    animation: s2cShimmer 1.5s ease infinite;
    border-radius: 20px;
}

/* Skeleton card header */
.s2c-skeleton-header,
.enh-skeleton-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* Skeleton card body */
.s2c-skeleton-body,
.enh-skeleton-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* ============================================================================
   SHIMMER ANIMATION
   ============================================================================ */

@keyframes s2cShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes s2cFadeInCard {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes s2cFadeOutCard {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-4px);
    }
}

/* ============================================================================
   SEARCHING LABEL
   ============================================================================ */

.s2c-searching-label,
.enh-searching-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
}

.s2c-searching-label svg,
.enh-searching-label svg {
    flex-shrink: 0;
}

/* ============================================================================
   PROGRESS COUNTER
   ============================================================================ */

.s2c-progress-counter,
.enh-progress-counter {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    margin-bottom: 16px;
    transition: opacity 0.5s ease;
}

.s2c-progress-bar-container,
.enh-progress-bar-container {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    overflow: hidden;
}

.s2c-progress-bar-fill,
.enh-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--vc-accent-primary-hover), #8b5cf6);
    border-radius: 2px;
    transition: width 0.5s ease;
}

.s2c-progress-text,
.enh-progress-text {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    white-space: nowrap;
}

/* Fade out when complete */
.s2c-progress-counter.fading,
.enh-progress-counter.fading {
    opacity: 0;
}

/* ============================================================================
   ALTERNATIVES SEARCHING STATE
   ============================================================================ */

.s2c-alternatives-searching {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 8px 0;
}

.s2c-alternatives-searching .s2c-skeleton-card {
    opacity: 1;
}

.s2c-alternatives-searching .s2c-searching-label {
    margin-top: 8px;
    padding-top: 12px;
    border-top: none;
}

/* ============================================================================
   NO ALTERNATIVES FOUND CARD
   ============================================================================ */

.s2c-no-alternatives-card,
.enh-no-alternatives-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.s2c-no-alternatives-label,
.enh-no-alternatives-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    gap: 8px;
}

.s2c-no-alternatives-label svg,
.enh-no-alternatives-label svg {
    width: 16px;
    height: 16px;
    opacity: 0.6;
}

/* ============================================================================
   CARD TRANSITION ANIMATIONS
   ============================================================================ */

.s2c-repair-card,
.enh-issue-card {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.s2c-repair-card.entering,
.enh-issue-card.entering {
    opacity: 0;
    transform: translateY(8px);
}

.s2c-repair-card.entered,
.enh-issue-card.entered {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================================================
   PROCESSING BADGE
   ============================================================================ */

.s2c-processing-badge,
.enh-processing-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(139, 92, 246, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    color: #a78bfa;
}

.s2c-processing-badge svg,
.enh-processing-badge svg {
    width: 12px;
    height: 12px;
}

/* Spinning animation for the processing icon */
.s2c-processing-badge .spin,
.enh-processing-badge .spin {
    animation: s2cSpin 1s linear infinite;
}

@keyframes s2cSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ============================================================================
   LIVE UPDATE INDICATOR
   ============================================================================ */

.s2c-live-indicator,
.enh-live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.s2c-live-dot,
.enh-live-dot {
    width: 6px;
    height: 6px;
    background: var(--vc-status-supported);
    border-radius: 50%;
    animation: s2cPulse 1.5s ease infinite;
}

@keyframes s2cPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

/* ============================================================================
   ENHANCED HEADER WITH PROGRESS
   ============================================================================ */

.s2c-header-with-progress,
.enh-header-with-progress {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.s2c-header-row,
.enh-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================================================
   CLAIM NAVIGATION (Focus Mode Header)
   ============================================================================ */

.s2c-claim-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.s2c-claim-position {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    min-width: 120px;
    text-align: center;
}

.s2c-nav-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.6);
}

.s2c-nav-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.s2c-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================================ */

@media (max-width: 768px) {
    .s2c-progress-counter,
    .enh-progress-counter {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .s2c-progress-text,
    .enh-progress-text {
        text-align: center;
    }

    .s2c-claim-nav {
        gap: 8px;
    }

    .s2c-claim-position {
        font-size: 12px;
        min-width: 100px;
    }

    .s2c-nav-btn {
        width: 28px;
        height: 28px;
    }
}

/* ============================================================================
   INDETERMINATE PROGRESS BAR
   ============================================================================ */

@keyframes s2cIndeterminate {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(400%); }
}
