/* Shiko Loyalty Styles */

.shiko-loyalty-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}

.shiko-loyalty-section h3 {
    margin-top: 0;
    color: #B7080A;
    font-size: 1.25rem;
}

.loyalty-points-display {
    margin: 1rem 0;
}

.points-balance {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.points-number {
    font-size: 2rem;
    font-weight: bold;
    color: #B7080A;
}

.points-label {
    font-size: 1rem;
    color: #6c757d;
}

.points-info {
    margin-bottom: 1rem;
}

.points-info p {
    margin: 0;
    font-size: 0.9rem;
    color: #6c757d;
}

#refresh-loyalty-points {
    background: #B7080A;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#refresh-loyalty-points:hover {
    background: #E40303;
}

#refresh-loyalty-points:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .shiko-loyalty-section {
        padding: 1rem;
    }

    .points-number {
        font-size: 1.5rem;
    }

    .points-balance {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* RTL support */
[dir="rtl"] .points-balance {
    direction: rtl;
}

[dir="rtl"] .points-number {
    order: 2;
}

[dir="rtl"] .points-label {
    order: 1;
}

/* ===================================================================
 * Earn-awareness — Game Drop ribbon (Proposal B)
 * Used on single product (red) + thank-you page (gold variant).
 * =================================================================== */

.shiko-loyalty-earn {
    display: flex;
    align-items: stretch;
    margin: 18px 0;
    border: 2px solid #B7080A;
    border-radius: 8px;
    background:
        repeating-linear-gradient(135deg, transparent 0 12px, rgba(228, 3, 3, 0.04) 12px 14px),
        #fff;
    overflow: hidden;
    line-height: 1.3;
    color: #1d2327;
    font-size: 14px;
    box-sizing: border-box;
}

.shiko-loyalty-earn-pill {
    background: #0f1115;
    color: #fff;
    padding: 10px 28px 10px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
    -webkit-clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
            clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
    flex-shrink: 0;
}

.shiko-loyalty-earn-pill img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(228, 3, 3, 0.6));
}

.shiko-loyalty-earn-star {
    color: #1d2327;
    font-size: 14px;
    line-height: 1;
}

.shiko-loyalty-earn-body {
    flex: 1;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.shiko-loyalty-earn-text { flex: 1; min-width: 0; }

.shiko-loyalty-earn-headline {
    font-size: 16px;
    font-weight: 700;
    color: #1d2327;
}

.shiko-loyalty-earn-num {
    color: #B7080A;
    font-size: 20px;
    font-weight: 800;
    margin: 0 4px;
}

.shiko-loyalty-earn-sub {
    font-size: 11.5px;
    color: #6c7177;
    margin-top: 2px;
    letter-spacing: 0.2px;
}

.shiko-loyalty-earn-cta {
    flex-shrink: 0;
    background: #B7080A;
    color: #fff !important;
    font-weight: 700;
    font-size: 11.5px;
    padding: 8px 14px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    text-decoration: none;
    border: 0;
    cursor: pointer;
    transition: background-color 120ms ease;
}

.shiko-loyalty-earn-cta:hover,
.shiko-loyalty-earn-cta:focus {
    background: #E40303;
    color: #fff !important;
    text-decoration: none;
}

/* ---- Gold "Won" variant for thank-you page ---- */
.shiko-loyalty-earn--won {
    border-color: #ffce00;
    background:
        linear-gradient(180deg, #fffbea 0%, #fff 70%),
        #fff;
}

.shiko-loyalty-earn--won .shiko-loyalty-earn-pill {
    background: #ffce00;
    color: #1d2327;
}

.shiko-loyalty-earn--won .shiko-loyalty-earn-num {
    color: #b8860b;
}

.shiko-loyalty-earn--won .shiko-loyalty-earn-cta {
    background: #1d2327;
}

.shiko-loyalty-earn--won .shiko-loyalty-earn-cta:hover,
.shiko-loyalty-earn--won .shiko-loyalty-earn-cta:focus {
    background: #000;
}

/* ---- Cart totals row keeps it tight inside <tr> ---- */
.shiko-loyalty-earn--cart th,
.shiko-loyalty-earn--cart td {
    color: #B7080A;
    font-weight: 600;
    background: rgba(228, 3, 3, 0.04);
}

/* ---- Mobile: stack the body so CTA wraps below text ---- */
@media (max-width: 480px) {
    .shiko-loyalty-earn-body {
        flex-wrap: wrap;
    }
    .shiko-loyalty-earn-cta {
        width: 100%;
        text-align: center;
    }
}

/* ---- RTL: flip the wedge direction ---- */
[dir="rtl"] .shiko-loyalty-earn-pill {
    -webkit-clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%);
            clip-path: polygon(14px 0, 100% 0, 100% 100%, 0 100%);
    padding: 10px 16px 10px 28px;
}