/* Winners Page Styles - CDN Cacheable */
/* Version: 1.0.0 */
/* Last Updated: 2026-02-04 */

/* ============================================
   Container
   ============================================ */
.winners-container {
    padding-bottom: var(--spacing-xl);
}

.winners-loading,
.winners-error {
    color: var(--color-text-secondary);
}

.winners-loading {
    padding: 0 var(--spacing-md);
    min-height: 300px;
}

.winners-error {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.winners-loading-content {
    animation: fadeIn var(--transition-medium, 0.3s) ease;
}

.winner-card-skeleton {
    pointer-events: none;
}

.winner-card-skeleton,
.winner-card-skeleton .weekly-winner-avatar,
.winner-card-skeleton .top-winner-avatar,
.winner-card-skeleton .winner-skeleton-line,
.winner-card-skeleton .winner-skeleton-pill {
    background: linear-gradient(90deg, #2f3643 25%, #3f4555 50%, #2f3643 75%);
    background-size: 200% 100%;
    animation: winner-skeleton-shimmer 1.2s infinite;
}

.winner-card-skeleton .weekly-winner-avatar,
.winner-card-skeleton .top-winner-avatar {
    border: none;
}

.winner-skeleton-line {
    border-radius: 999px;
    height: 10px;
    flex-shrink: 0;
}

.winner-skeleton-line-xs {
    width: 42px;
}

.winner-skeleton-line-xxs {
    width: 55px;
    margin-bottom: 6px;
}

.winner-skeleton-line-sm {
    width: 130px;
}

.winner-skeleton-line-md {
    width: 78px;
    height: 14px;
    margin-bottom: 0;
}

.winner-skeleton-line-lg {
    width: 88px;
    height: 14px;
}

.winner-skeleton-pill {
    border-radius: 10px;
    margin-bottom: 2px;
    width: 68px;
}

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

    100% {
        background-position: -200% 0;
    }
}

.section-title {
    font-size: 16px;
    font-weight: 400;
    color: #E4E4E4;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

/* ============================================
   Weekly Winners Grid
   ============================================ */
.weekly-winners-section {
    margin-bottom: var(--spacing-xl);
}

.weekly-winners-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    position: relative;
}

.weekly-winner-card {
    background: #1D1F25;
    border-radius: 16px;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 165px;
    border: 1.5px solid transparent;
    background-image:
        linear-gradient(#1D1F25, #1D1F25),
        linear-gradient(to bottom, #1D1F25, #3F4556);
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
}

.weekly-winner-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #D9D9D9;
    overflow: hidden;
    margin-bottom: var(--spacing-sm);
}

.weekly-winner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.weekly-winner-username {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: var(--spacing-xs);
}

.weekly-winner-prize {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.weekly-winner-prize-value {
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
}

.weekly-winner-prize-icon {
    width: 16px;
    height: 16px;
}

.weekly-winner-prize-label {
    font-size: 10px;
    font-weight: 400;
    color: #777A80;
    text-align: center;
}

/* ============================================
   View All Button Card
   ============================================ */
.view-all-card {
    background: #1D1F25;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 165px;
    cursor: pointer;
    transition: background-color var(--transition-fast);
}

.view-all-card:hover {
    background: #252830;
}

.view-all-icon {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #383C48;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.view-all-icon svg {
    width: 20px;
    height: 20px;
    stroke: #1D1F25;
    stroke-width: 3px;
}

.view-all-text {
    font-size: 12px;
    font-weight: 700;
    color: #FFFFFF;
}

/* ============================================
   Top Winners List
   ============================================ */
.top-winners-section {
    margin-top: var(--spacing-xl);
}

.top-winners-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.top-winner-card {
    background: #1D1F25;
    border-radius: 15px;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 82px;
    border: 1.5px solid transparent;
    background-image:
        linear-gradient(#1D1F25, #1D1F25),
        linear-gradient(to bottom, #1D1F25, #3F4556);
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
}

.top-winner-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    direction: rtl;
    text-align: right;
}

.top-winner-avatar {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: #D9D9D9;
    overflow: hidden;
    flex-shrink: 0;
}

.top-winner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.top-winner-username {
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
    text-align: right;
}

.top-winner-prize {
    display: flex;
    align-items: center;
    gap: 5px;
    direction: rtl;
    text-align: right;
}

.top-winner-prize-label {
    font-size: 10px;
    font-weight: 400;
    color: #FFFFFF;
}

.top-winner-prize-value {
    font-size: 16px;
    font-weight: 700;
    color: #FFFFFF;
}

.top-winner-prize-icon {
    width: 19px;
    height: 19px;
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--color-text-secondary);
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

/* ============================================
   Bottom Sheet Overlay
   ============================================ */
.bottom-sheet-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.bottom-sheet-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   Bottom Sheet
   ============================================ */
.bottom-sheet {
    position: fixed;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    bottom: 0;
    width: 100%;
    max-width: 390px;
    height: 756px;
    max-height: 90vh;
    z-index: 999;
    transition: transform 0.3s ease;
}

.bottom-sheet.active {
    transform: translateX(-50%) translateY(0);
}

.bottom-sheet-container {
    width: 100%;
    height: 100%;
    background: #16181D;
    opacity: 0.99;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bottom-sheet-header {
    display: flex;
    flex-direction: row-reverse;
    justify-content: space-between;
    align-items: center;
    padding: 18px 16px;
    gap: 12px;
    flex-shrink: 0;
}

.bottom-sheet-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.bottom-sheet-close svg {
    width: 20px;
    height: 20px;
    stroke: #E4E4E4;
}

.bottom-sheet-title {
    font-family: 'IRANSansXFaNum', 'Vazirmatn', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 24px;
    color: #E4E4E4;
    text-align: right;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bottom-sheet-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 16px 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bottom-sheet-content::-webkit-scrollbar {
    display: none;
}

.bottom-sheet-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
    color: #777A80;
    gap: 12px;
}

.bottom-sheet-loading p {
    margin: 0;
    font-size: 14px;
}

/* ============================================
   Winners Grid in Bottom Sheet
   ============================================ */
.sheet-winners-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sheet-winners-row {
    display: flex;
    flex-direction: row;
    gap: 16px;
    justify-content: space-between;
}

.sheet-winner-card {
    width: 171px;
    height: 52px;
    background: #1D1F25;
    border-radius: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0 8px;
    gap: 8px;
    direction: rtl;
    border: 1.5px solid transparent;
    background-image:
        linear-gradient(#1D1F25, #1D1F25),
        linear-gradient(to bottom, #1D1F25, #3F4556);
    background-origin: padding-box, border-box;
    background-clip: padding-box, border-box;
}

.sheet-winner-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #D9D9D9;
    overflow: hidden;
    flex-shrink: 0;
}

.sheet-winner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sheet-winner-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.sheet-winner-username {
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 12px;
    line-height: 20px;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sheet-winner-prize {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 4px;
}

.sheet-winner-prize-value {
    font-family: 'IRANSansXFaNum', 'Vazirmatn', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 14px;
    line-height: 24px;
    color: #FFFFFF;
}

.sheet-winner-prize-icon {
    width: 16px;
    height: 16px;
}

/* ============================================
   Empty state in sheet
   ============================================ */
.sheet-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #777A80;
}

.sheet-empty-state svg {
    width: 48px;
    height: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.sheet-empty-state p {
    margin: 0;
    font-size: 14px;
}

/* ============================================
   Load more button
   ============================================ */
.sheet-load-more {
    display: flex;
    justify-content: center;
    padding: 16px 0;
}

.sheet-load-more-btn {
    background: #1D1F25;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.sheet-load-more-btn:hover {
    background: #252830;
}

.sheet-load-more-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Weekly Winners Section Animation */
.weekly-winners-section {
    animation: fadeIn 0.3s ease;
    animation-fill-mode: both;
}

/* Weekly Winner Cards Stagger Animation */
.weekly-winner-card {
    animation: fadeIn 0.3s ease;
    animation-fill-mode: both;
}

.weekly-winner-card:nth-child(1) {
    animation-delay: 0.05s;
}

.weekly-winner-card:nth-child(2) {
    animation-delay: 0.1s;
}

.weekly-winner-card:nth-child(3) {
    animation-delay: 0.15s;
}

.weekly-winner-card:nth-child(4) {
    animation-delay: 0.2s;
}

.weekly-winner-card:nth-child(5) {
    animation-delay: 0.25s;
}

.weekly-winner-card:nth-child(6) {
    animation-delay: 0.3s;
}

/* View All Card Animation */
.view-all-card {
    animation: fadeIn 0.3s ease;
    animation-fill-mode: both;
    animation-delay: 0.3s;
}

/* Top Winners Section Animation */
.top-winners-section {
    animation: fadeIn 0.3s ease;
    animation-fill-mode: both;
    animation-delay: 0.35s;
}

/* Top Winner Cards Stagger Animation */
.top-winner-card {
    animation: fadeIn 0.3s ease;
    animation-fill-mode: both;
}

.top-winner-card:nth-child(1) {
    animation-delay: 0.4s;
}

.top-winner-card:nth-child(2) {
    animation-delay: 0.45s;
}

.top-winner-card:nth-child(3) {
    animation-delay: 0.5s;
}

.top-winner-card:nth-child(4) {
    animation-delay: 0.55s;
}

.top-winner-card:nth-child(5) {
    animation-delay: 0.6s;
}

.top-winner-card:nth-child(6) {
    animation-delay: 0.65s;
}

.top-winner-card:nth-child(7) {
    animation-delay: 0.7s;
}

.top-winner-card:nth-child(8) {
    animation-delay: 0.75s;
}

.top-winner-card:nth-child(9) {
    animation-delay: 0.8s;
}

.top-winner-card:nth-child(10) {
    animation-delay: 0.85s;
}

/* Bottom Sheet Content Animation */
.sheet-winner-card {
    animation: fadeIn 0.3s ease;
    animation-fill-mode: both;
}

.sheet-winners-row:nth-child(1) .sheet-winner-card {
    animation-delay: 0.05s;
}

.sheet-winners-row:nth-child(2) .sheet-winner-card {
    animation-delay: 0.1s;
}

.sheet-winners-row:nth-child(3) .sheet-winner-card {
    animation-delay: 0.15s;
}

.sheet-winners-row:nth-child(4) .sheet-winner-card {
    animation-delay: 0.2s;
}

.sheet-winners-row:nth-child(5) .sheet-winner-card {
    animation-delay: 0.25s;
}

.sheet-winners-row:nth-child(6) .sheet-winner-card {
    animation-delay: 0.3s;
}

.sheet-winners-row:nth-child(7) .sheet-winner-card {
    animation-delay: 0.35s;
}

.sheet-winners-row:nth-child(8) .sheet-winner-card {
    animation-delay: 0.4s;
}

.sheet-winners-row:nth-child(9) .sheet-winner-card {
    animation-delay: 0.45s;
}

.sheet-winners-row:nth-child(10) .sheet-winner-card {
    animation-delay: 0.5s;
}
