/**
 * Pick Preview Card Component Styles
 *
 * A card component that shows game matchup and confidence
 * with the actual pick blurred/locked until unlocked.
 *
 * Features:
 * - Clear visual separation between free/locked content
 * - Subtle blur effect using backdrop-filter
 * - Non-aggressive unlock prompt (Calm Technology)
 * - Consistent with existing game_card.html patterns
 * - Mobile responsive
 * - GPU-accelerated animations
 *
 * Design Philosophy:
 * - Follows Wa (harmony) principle with neutral palette
 * - Uses Ma (negative space) for breathing room
 * - CTA color: #10B981 (Teal Green from style guide)
 */

/* Clickable pick card styles */
.pick-card-clickable {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.pick-card-clickable:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Base Card */
.pick-preview-card {
    background-color: var(--card-bg-color);
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 100%;
    min-height: 460px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px var(--shadow-color, rgba(0, 0, 0, 0.1));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
    /* GPU acceleration */
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.pick-preview-card:hover {
    transform: translateY(-3px) translateZ(0);
    box-shadow: 0 6px 12px var(--shadow-color, rgba(0, 0, 0, 0.15));
}

/* Locked/Unlocked States */
.pick-preview-card.locked {
    border: 2px dashed var(--border-color, #DEE2E6);
}

.pick-preview-card.unlocked {
    border: 2px solid #10B981;
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.1), 0 4px 12px rgba(16, 185, 129, 0.15);
}

.pick-preview-card.unlocked:hover {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2), 0 8px 16px rgba(16, 185, 129, 0.2);
}

/* Matchup Section */
.pick-preview__matchup {
    flex-shrink: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color, #DEE2E6);
    margin-bottom: 1rem;
}

.pick-preview__team {
    flex: 1;
    max-width: 140px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.pick-preview__team-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary, #212529);
    margin-top: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
    line-height: 1.2;
    min-height: 2.4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Team logo sizing now centralized in global.css */
/* Using .team-logo-large class from global styles, aliased as .team-logo-preview */
.team-logo.team-logo-preview {
    /* Use standardized large size from global.css */
    width: var(--logo-lg);
    height: var(--logo-lg);
    padding: 12px;
    /* GPU acceleration for smooth animations */
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.team-logo.team-logo-preview:hover {
    transform: scale(1.05) translateZ(0);
    box-shadow: 0 4px 10px var(--player-shadow, rgba(0, 0, 0, 0.15));
}

.pick-preview__vs {
    flex-shrink: 0;
    padding-top: 30px;
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary, #6C757D);
    font-style: italic;
}

/* Date/Time Display */
.pick-preview__datetime {
    margin-top: 0.75rem;
}

.datetime-value {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary, #6C757D);
}

/* Line/Spread Section */
.pick-preview__line {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
}

.line-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-secondary, #6C757D);
    padding: 0.25rem 0;
    border-radius: 0;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: none;
}

.line-badge i {
    color: var(--text-secondary, #6C757D);
}

.line-value {
    margin-left: 0.25rem;
}

/* Confidence Section */
.pick-preview__confidence {
    flex-shrink: 0;
    padding: 1rem;
    background: linear-gradient(135deg, var(--bg-secondary, #FFFFFF) 0%, rgba(16, 185, 129, 0.03) 100%);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.confidence-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary, #6C757D);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.confidence-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.confidence-stars {
    display: flex;
    gap: 0.25rem;
    color: #FFC107;
    font-size: 1.1rem;
}

.confidence-stars .far {
    color: var(--border-color, #DEE2E6);
}

.confidence-percentage {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #212529);
}

.confidence-value-label {
    margin-top: 0.75rem;
    padding: 0.4rem 0.8rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    display: inline-block;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Value label color tiers */
.value-strong {
    background: linear-gradient(135deg, #059669 0%, #10B981 100%);
    color: white;
    border: 1px solid #047857;
}

.value-good {
    background: linear-gradient(135deg, #0891B2 0%, #06B6D4 100%);
    color: white;
    border: 1px solid #0E7490;
}

.value-moderate {
    background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    color: white;
    border: 1px solid #B45309;
}

.value-speculative {
    background: linear-gradient(135deg, #DC2626 0%, #EF4444 100%);
    color: white;
    border: 1px solid #B91C1C;
}

.value-longshot {
    background: linear-gradient(135deg, #7C2D12 0%, #9A3412 100%);
    color: white;
    border: 1px solid #6B2711;
}

/* Pick Section */
.pick-preview__pick-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    min-height: 140px;
}

/* Unlocked Pick Content - HERO SECTION */
.pick-content {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.12), rgba(16, 185, 129, 0.04));
    border-radius: 0.5rem;
    border: 1px solid rgba(16, 185, 129, 0.5);
    box-shadow:
        0 0 0 1px rgba(16, 185, 129, 0.1),
        0 0 20px rgba(16, 185, 129, 0.15);
}

.pick-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary, #6C757D);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.pick-team {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #212529);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pick-spread {
    font-size: 1rem;
    color: var(--text-secondary, #6C757D);
    font-weight: 600;
}

/* Locked Pick Content - Blurred */
.pick-locked {
    position: relative;
}

.pick-content-blurred {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary, #FFFFFF) 0%, rgba(0, 0, 0, 0.02) 100%);
    border-radius: 0.5rem;
    filter: blur(8px);
    user-select: none;
    pointer-events: none;
    opacity: 0.6;
}

.placeholder-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary, #212529);
    margin-bottom: 0.25rem;
}

.placeholder-spread {
    font-size: 1rem;
    color: var(--text-secondary, #6C757D);
}

/* Unlock Overlay */
.pick-unlock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(2px);
    border-radius: 0.5rem;
}

.unlock-content {
    text-align: center;
    padding: 1rem;
}

.unlock-icon {
    color: var(--text-secondary, #6C757D);
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.unlock-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary, #6C757D);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unlock-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

/* Unlock Button - Calm Technology Approach */
.btn-unlock {
    background: #10B981;
    color: white;
    border: none;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    /* GPU acceleration */
    will-change: transform, box-shadow;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.btn-unlock:hover {
    background: #0B956C;
    transform: translateY(-2px) translateZ(0);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
    color: white;
}

.btn-unlock:active {
    transform: translateY(0) translateZ(0);
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.btn-unlock i {
    font-size: 0.9rem;
}

/* Mobile Responsive - Use standardized logo sizing */
@media (max-width: 768px) {
    .pick-preview-card {
        padding: 1rem;
        min-height: 420px;
    }

    .team-logo.team-logo-preview {
        width: var(--logo-md);
        height: var(--logo-md);
        padding: 10px;
    }

    .pick-preview__team {
        max-width: 150px;
    }

    .pick-preview__team-name {
        font-size: 0.9rem;
        margin-top: 0.5rem;
        min-height: 2.2em;
    }

    .pick-preview__vs {
        font-size: 1rem;
        padding-top: 50px;
    }

    .confidence-stars {
        font-size: 1rem;
    }

    .confidence-percentage {
        font-size: 1.1rem;
    }

    .pick-team {
        font-size: 1.1rem;
    }

    .btn-unlock {
        padding: 0.625rem 1.25rem;
        font-size: 0.85rem;
    }

    .confidence-value-label {
        font-size: 0.8rem;
        padding: 0.35rem 0.7rem;
    }
}

@media (max-width: 576px) {
    .pick-preview-card {
        padding: 0.75rem;
        min-height: 400px;
    }

    .team-logo.team-logo-preview {
        width: var(--logo-sm);
        height: var(--logo-sm);
        padding: 8px;
    }

    .pick-preview__team {
        max-width: 125px;
    }

    .pick-preview__team-name {
        font-size: 0.85rem;
        margin-top: 0.4rem;
        min-height: 2em;
    }

    .pick-preview__vs {
        font-size: 0.95rem;
        padding-top: 38px;
        margin: 0 0.5rem;
    }

    .pick-preview__confidence {
        padding: 0.75rem;
    }

    .confidence-stars {
        font-size: 0.9rem;
    }

    .confidence-percentage {
        font-size: 1rem;
    }

    .pick-content,
    .pick-content-blurred {
        padding: 1rem;
    }

    .pick-team {
        font-size: 1rem;
        flex-direction: column;
        gap: 0.25rem;
    }

    .unlock-icon i {
        font-size: 1.5rem;
    }

    .btn-unlock {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .confidence-value-label {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
        margin-top: 0.5rem;
    }
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .pick-preview-card,
    .team-logo.team-logo-preview,
    .btn-unlock {
        transition: none;
        animation: none;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .pick-preview-card {
        border-width: 3px;
    }

    .pick-content-blurred {
        filter: blur(10px);
    }

    .btn-unlock {
        border: 2px solid white;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .pick-preview-card {
        background-color: var(--card-bg-color, #1a1a1a);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }

    .pick-preview-card.unlocked {
        box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3), 0 4px 12px rgba(16, 185, 129, 0.25);
    }

    .pick-unlock-overlay {
        background: rgba(0, 0, 0, 0.1);
    }

    .confidence-stars .far {
        color: rgba(255, 255, 255, 0.2);
    }
}

[data-theme="dark"] .pick-preview-card {
    background-color: var(--card-bg-color, #1a1a1a);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .pick-preview-card.unlocked {
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.3), 0 4px 12px rgba(16, 185, 129, 0.25);
}

[data-theme="dark"] .pick-unlock-overlay {
    background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .confidence-stars .far {
    color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .confidence-value-label {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .confidence-percentage {
    color: #f0f0f0;
}

/* Skeleton Loading States */
.skeleton-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-team-name {
    width: 100%;
    height: 16px;
    margin-top: 0.5rem;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-datetime {
    width: 80%;
    height: 14px;
    margin: 0 auto;
    border-radius: 4px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

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

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

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

.skeleton-sr-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Dark mode skeleton */
@media (prefers-color-scheme: dark) {
    .skeleton-logo,
    .skeleton-team-name,
    .skeleton-datetime,
    .skeleton-confidence-bar,
    .skeleton-pick-content {
        background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
        background-size: 200% 100%;
    }
}

[data-theme="dark"] .skeleton-logo,
[data-theme="dark"] .skeleton-team-name,
[data-theme="dark"] .skeleton-datetime,
[data-theme="dark"] .skeleton-confidence-bar,
[data-theme="dark"] .skeleton-pick-content {
    background: linear-gradient(90deg, #2a2a2a 25%, #3a3a3a 50%, #2a2a2a 75%);
    background-size: 200% 100%;
}

/* ==========================================
   Quality Badge Styles
   ========================================== */

/* Quality tier badges - top left position */
.pick-preview-card .badge[title*="Quality Score"] {
    font-size: 0.7rem;
    padding: 0.35em 0.65em;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Elite tier - gold/premium look */
.pick-preview-card .badge.bg-warning {
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%) !important;
    border: 1px solid #B45309;
    animation: elite-glow 2s ease-in-out infinite alternate;
}

@keyframes elite-glow {
    from {
        box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
    }
    to {
        box-shadow: 0 2px 8px rgba(245, 158, 11, 0.6);
    }
}

/* Strong tier - success green with subtle pulse */
.pick-preview-card .badge.bg-success[title*="Quality Score"] {
    background: linear-gradient(135deg, #10B981 0%, #059669 100%) !important;
    border: 1px solid #047857;
}

/* Edge display in pick section */
.pick-edge {
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
    margin-top: 0.5rem;
}

.pick-edge small {
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.pick-edge .text-warning {
    color: #F59E0B !important;
}

.pick-edge .text-success {
    color: #10B981 !important;
}

.pick-edge .text-info {
    color: #06B6D4 !important;
}

/* Quality filter highlight - cards with high quality picks */
.pick-preview-card.quality-elite {
    border: 2px solid #F59E0B;
}

.pick-preview-card.quality-strong {
    border: 2px solid #10B981;
}
