/**
 * Maxxis Rewards - Dashboard Styles
 * Clean, modular card-based layout
 */

/* Dashboard Container */
.maxxis-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 120px;
}

/* Welcome Banner */
.maxxis-welcome-banner {
    background: #FF5400;
    color: #fff;
    padding: 30px 40px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.maxxis-welcome-banner .banner-logo {
    max-height: 60px;
    width: auto;
}

.maxxis-welcome-banner .banner-tagline {
    font-size: 34px;
    font-weight: 800;
    color: #000;
    text-align: right;
    letter-spacing: 0px;
    text-transform: uppercase;
    margin: 0;
}

/* Dashboard Grid */
.maxxis-dashboard-grid {
    display: flex;
    flex-direction: column;
    gap: 45px;
}

/* Stats Grid */
.maxxis-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.maxxis-stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.maxxis-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 28px;
    margin-bottom: 10px;
    filter: grayscale(100%);
    opacity: 0.6;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Product Showcase Section */
.maxxis-product-showcase {
    margin: 20px 0 0px 0;
    padding: 0 10px;
}

.maxxis-product-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.maxxis-product-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px 20px 20px 20px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 320px;
    overflow: visible;
    position: relative;
}

.maxxis-product-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.product-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: 10px;
    position: relative;
    overflow: visible;
    margin-top: 0;
}

.product-image {
    max-width: 100%;
    max-height: 280px;
    width: auto;
    height: auto;
    object-fit: contain;
    position: relative;
    z-index: 2;
}

/* Umbrella special - 140% width, centered */
.maxxis-product-card:last-child .product-image {
    max-width: 140%;
    transform: translateX(0%);
}

/* Shop card special styling */
.maxxis-product-card.shop-card {
    background: linear-gradient(135deg, #1a1a2e, #0d1f51);
    overflow: visible;
}

.maxxis-product-card.shop-card .product-image-wrapper {
    background: transparent;
    border-radius: 0;
}

.maxxis-product-card.shop-card .product-image {
    max-height: 280px;
}

/* Leaderboard Section */
.maxxis-leaderboard-section {
    background: #fff;
    border-radius: 8px;
    padding: 0;
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    overflow: hidden;
}

.maxxis-leaderboard-section .section-header {
    padding: 30px 30px 0px 30px;
}

/* Leaderboard Grid - 3 Columns */
.maxxis-leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    padding: 0px 20px 40px 20px;
}

/* Leaderboard Item */
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 50px;
    min-height: 80px;
}

/* Remove bottom border for last items in each column */
.leaderboard-item:nth-child(4),
.leaderboard-item:nth-child(7),
.leaderboard-item:nth-child(10) {
    border-bottom: none;
}

/* Rank Badge Wrapper */
.rank-badge-wrapper {
    flex-shrink: 0;
}

.leaderboard-item .rank-badge {
    display: inline-block;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 700;
    min-width: 48px;
    text-align: center;
}

.leaderboard-item .rank-badge.gold {
    background: #fff;
    color: #888;
}

.leaderboard-item .rank-badge.silver {
    background: #fff;
    color: #888;
}

.leaderboard-item .rank-badge.bronze {
    background: #fff;
    color: #888;
}

.leaderboard-item .rank-badge.grey {
    background: #fff;
    color: #888;
}

/* Rider Info Wrapper */
.rider-info-wrapper {
    flex: 1;
    min-width: 0;
}

.leaderboard-item .rider-info {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
}

.leaderboard-item .race-number-badge {
    /* background: #FF5400; */
    color: white;
    font-size: 36px;
    font-weight: 900;
    padding: 8px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: 55px;
    height: 70px;
    background-image: url('../images/front-plate.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    flex-shrink: 0;
}

.leaderboard-item .race-number-badge::before {
    content: none !important;
    display: none !important;
}

.leaderboard-item .rider-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    min-width: 0;
}

.leaderboard-item .rider-name {
    font-size: 24px;
    font-weight: 500;
    color: #000;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.leaderboard-item .rider-class {
    font-size: 13px;
    color: #888;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Points Badge Wrapper */
.points-badge-wrapper {
    flex-shrink: 0;
}

.leaderboard-item .points-badge {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 6px;
    background: #0d1f5117;
    color: #0d1f51;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.maxxis-leaderboard-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Cashback Section */
.maxxis-cashback-section {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    border: 1px solid #e6e6e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.maxxis-cashback-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.maxxis-cashback-card {
    background: #fff;
    border-radius: 8px;
    border: 2px solid #e6e6e6;
    overflow: hidden;
    transition: all 0.2s;
}

.maxxis-cashback-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Available: Green & Grey */
.maxxis-cashback-card.available {
    border-color: #28a745;
    background: #fff;
}

.maxxis-cashback-card.available .card-header {
    background: #f8f9fa;
}

.maxxis-cashback-card.available .status-badge {
    background: #28a745;
    color: #fff;
}

/* Pending: Blue & Grey */
.maxxis-cashback-card.pending {
    border-color: #0d1f51;
    background: #fff;
}

.maxxis-cashback-card.pending .card-header {
    background: #f8f9fa;
}

.maxxis-cashback-card.pending .status-badge {
    background: #0d1f51;
    color: #fff;
}

/* Redeemed: Grey */
.maxxis-cashback-card.redeemed {
    border-color: #888;
    background: #fafafa;
}

.maxxis-cashback-card.redeemed .card-header {
    background: #f0f0f0;
}

.maxxis-cashback-card.redeemed .status-badge {
    background: #888;
    overflow: visible;
    color: #fff;
}

.maxxis-cashback-card.redeemed .cashback-amount {
    color: #888;
}

/* Expired: Red & Grey */
.maxxis-cashback-card.expired {
    border-color: #dc3545;
    background: #fafafa;
    opacity: 0.7;
}

.maxxis-cashback-card.expired .status-badge {
    background: #dc3545;
    color: #fff;
}

.maxxis-cashback-card.expired .cashback-amount {
    color: #888;
}

.maxxis-cashback-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.maxxis-cashback-card .card-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #333;
}

.maxxis-cashback-card .card-body {
    padding: 25px 20px;
    text-align: left;
}

.cashback-amount {
    font-size: 80px;
    font-weight: 800;
    color: #000;
    line-height: 1;
    margin-bottom: 8px;
    text-align: center;
}

.cashback-subtitle {
    font-size: 24px;
    font-weight: 500;
    color: #888;
    line-height: 1.2;
    margin-top: 0;
    text-align: center;
}

.cashback-expiry {
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    color: #ff0000;
    margin: 20px 0;
}

.cashback-short-text {
		font-size: 12px;
		font-weight: 500;
		color: #888;
    	text-align: center;
		margin-top: 10px;
}

.upload-receipt-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 24px;
    background: #28a745;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

.upload-receipt-btn:hover {
    background: #218838;
}

.status-message {
    font-size: 14px;
    padding: 12px 15px;
    border-radius: 6px;
    text-align: center;
}

/* Pending message: Orange & Grey */
.status-message.pending {
    background: #0d1f5117;
    color: #0d1f51;
    border: 1px solid #0d1f51;
}

/* Approved/Redeemed message: Black & Grey */
.status-message.approved {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #ddd;
}

/* Expired message */
.status-message.expired {
    background: #fef5f5;
    color: #dc3545;
    border: 1px solid #f5c6cb;
}

.maxxis-cashback-info {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 15px 20px;
    font-size: 13px;
    color: #555;
}

.maxxis-cashback-info p {
    margin: 0 0 10px;
    font-weight: 600;
}

.maxxis-cashback-info ol {
    margin: 0;
    padding-left: 20px;
}

.maxxis-cashback-info li {
    margin-bottom: 5px;
}

/* Promo Section - New Design */
.maxxis-promo-section {
    margin-bottom: 25px;
}

/* Desktop View (Option 4: Compact Banner) */
.promo-desktop {
    background: linear-gradient(135deg, #FF5400, #fbbf24, #FF5400);
    border-radius: 14px;
    padding: 3px;
}

.promo-desktop-inner {
    background: linear-gradient(90deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border-radius: 12px;
    padding: 25px 35px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.promo-desktop .promo-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
}

.promo-desktop .discount-circle {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #FF5400, #ff7b3a);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.promo-desktop .discount-number {
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.promo-desktop .discount-text {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.promo-desktop .promo-info h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 3px;
    color: #fff;
}

.promo-desktop .promo-info p {
    color: #94a3b8;
    font-size: 13px;
    margin: 0;
}

.promo-desktop .promo-items {
    display: flex;
    gap: 20px;
    flex: 1;
    justify-content: center;
}

.promo-desktop .promo-item {
    text-align: center;
    padding: 0 15px;
    border-left: 1px solid #334155;
}

.promo-desktop .promo-item:first-child {
    border-left: none;
}

.promo-desktop .item-name {
    font-size: 11px;
    color: #fff;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 2px;
}

.promo-desktop .item-old-price {
    font-size: 12px;
    color: #64748b;
    text-decoration: line-through;
    display: block;
}

.promo-desktop .item-new-price {
    color: #fbbf24;
    font-size: 18px;
    font-weight: 700;
}

.promo-desktop .promo-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
}

.promo-desktop .promo-code-box {
    background: rgba(251, 191, 36, 0.1);
    border: 2px dashed #fbbf24;
    border-radius: 8px;
    padding: 8px 18px;
    text-align: center;
}

.promo-desktop .promo-code-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
}

.promo-desktop .promo-code {
    font-size: 22px;
    font-weight: 800;
    color: #fbbf24;
}

.promo-desktop .shop-btn {
    background: #FF5400;
    color: #fff;
    border: none;
    padding: 14px 28px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    display: inline-block;
}

.promo-desktop .shop-btn:hover {
    background: #ff6a1a;
    color: #fff;
}

/* Mobile View - Hidden by default */
.promo-mobile {
    display: none;
}

/* Mobile View (Option 2: Gradient Border Cards) */
@media (max-width: 900px) {
    .promo-desktop {
        display: none;
    }
    
    .promo-mobile {
        display: block;
        background: linear-gradient(135deg, #FF5400, #fbbf24, #FF5400);
        border-radius: 16px;
        padding: 3px;
    }
    
    .promo-mobile-inner {
        background: #0f172a;
        border-radius: 14px;
        padding: 25px;
        color: #fff;
    }
    
    .promo-mobile .promo-top {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        gap: 15px;
    }
    
    .promo-mobile .promo-badge {
        background: #FF5400;
        color: #fff;
        padding: 6px 14px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        white-space: nowrap;
    }
    
    .promo-mobile .promo-code-box {
        display: flex;
        align-items: center;
        gap: 10px;
        background: rgba(251, 191, 36, 0.1);
        border: 2px dashed #fbbf24;
        border-radius: 8px;
        padding: 8px 14px;
    }
    
    .promo-mobile .promo-code-label {
        font-size: 11px;
        color: #94a3b8;
    }
    
    .promo-mobile .promo-code {
        font-size: 20px;
        font-weight: 800;
        color: #fbbf24;
    }
    
    .promo-mobile .promo-main {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .promo-mobile .promo-headline {
        font-size: 22px;
        font-weight: 800;
        margin: 0 0 8px;
        color: #fff;
    }
    
    .promo-mobile .promo-headline span {
        color: #FF5400;
    }
    
    .promo-mobile .promo-subtitle {
        color: #94a3b8;
        font-size: 13px;
        margin: 0;
    }
    
    .promo-mobile .promo-items-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .promo-mobile .promo-item {
        background: rgba(255,255,255,0.05);
        border-radius: 10px;
        padding: 15px;
        text-align: center;
    }
    
    .promo-mobile .item-name {
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 6px;
        color: #fff;
    }
    
    .promo-mobile .item-old-price {
        color: #64748b;
        text-decoration: line-through;
        font-size: 13px;
        display: block;
    }
    
    .promo-mobile .item-new-price {
        color: #fbbf24;
        font-size: 20px;
        font-weight: 800;
    }
    
    .promo-mobile .shop-btn-mobile {
        background: linear-gradient(135deg, #FF5400, #ff7b3a);
        color: #fff;
        border: none;
        padding: 14px 40px;
        border-radius: 30px;
        font-size: 14px;
        font-weight: 700;
        text-transform: uppercase;
        cursor: pointer;
        display: block;
        margin: 0 auto;
        text-decoration: none;
        text-align: center;
    }
    
    .promo-mobile .shop-btn-mobile:hover {
        color: #fff;
    }
}

/* Upload Modal */
.upload-progress {
    text-align: center;
    padding: 20px;
}

.upload-progress-bar {
    height: 8px;
    background: #e6e6e6;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF5400, #ff8c42);
    border-radius: 4px;
    transition: width 0.3s;
}

.upload-status {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Responsive */
@media (max-width: 991px) {
    .maxxis-product-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .maxxis-product-card {
        min-height: 300px;
    }
    
    .product-image-wrapper {
        min-height: 220px;
        margin-top: 0;
    }
    
    .product-image {
        max-width: 100%;
        max-height: 260px;
    }
    
    /* Umbrella 140% on tablet, centered */
    .maxxis-product-card:last-child .product-image {
        max-width: 140%;
        transform: translateX(0%);
    }
    
    .maxxis-cashback-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Leaderboard - 2 columns on tablet */
    .maxxis-leaderboard-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0px 18px 18px 18px;
    }
    
    .leaderboard-item {
        padding: 16px 12px;
    }
    
    /* Adjust which items have no bottom border */
    .leaderboard-item:nth-child(4) {
    }
    
    .leaderboard-item:nth-child(5),
    .leaderboard-item:nth-child(10) {
        border-bottom: none;
    }
}

@media (max-width: 767px) {
    .maxxis-welcome-banner {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 35px;
        text-align: center;
    }
    
    .maxxis-welcome-banner h1 {
        font-size: 20px;
    }
    
    .maxxis-welcome-banner .banner-tagline {
        text-align: center;
    }
    
    .maxxis-welcome-banner .banner-logo {
        margin-bottom: 15px;
    }
    
    .maxxis-product-showcase {
        padding: 0 5px;
        margin-top: 20px;
    }
    
    .maxxis-product-cards {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .maxxis-product-card {
        padding: 15px;
        min-height: 260px;
    }
    
    .product-image-wrapper {
        min-height: 180px;
        margin-top: 0;
    }
    
    .product-image {
        max-width: 100%;
        max-height: 220px;
    }
    
    /* Umbrella 140% on mobile, centered */
    .maxxis-product-card:last-child .product-image {
        max-width: 140%;
        transform: translateX(0%);
    }
    
    .maxxis-product-card.shop-card .product-image {
        max-height: 220px;
    }
    
    .maxxis-cashback-cards {
        grid-template-columns: 1fr;
    }
    
    .cashback-amount {
        font-size: 60px;
    }
    
    /* Leaderboard responsive */
.maxxis-leaderboard-section .section-header {
    /* padding: 0; */
}
    
    .maxxis-leaderboard-grid {
        grid-template-columns: 1fr;
        padding: 0px 15px 15px 15px;
    }
    
    .leaderboard-item {
        padding: 15px 10px;
        min-height: 75px;
    }
    
    .leaderboard-item:nth-child(4),
    .leaderboard-item:nth-child(7) {
    }
    
    .leaderboard-item .rank-badge {
        padding: 8px 12px;
        font-size: 12px;
        min-width: 42px;
    }
    
    .leaderboard-item .race-number-badge {
        width: 44px;
        height: 56px;
        font-size: 13px;
    }
    
    .leaderboard-item .rider-info {
        gap: 10px;
    }
    
    .leaderboard-item .rider-name {
        font-size: 14px;
    }
    
    .leaderboard-item .rider-class {
        font-size: 12px;
    }
    
    .leaderboard-item .points-badge {
        padding: 8px 14px;
        font-size: 13px;
    }
}