/* ============================================================
   Pirate Win — Rewards / Shop Widget
   Matches the main Pirate Win page design
   ============================================================ */

:root {
    --shop-bg: #0f1729;
    --shop-card: #18243b;
    --shop-card-light: #1e2a45;

    --shop-border: rgba(255, 255, 255, 0.07);

    --shop-purple: #8b5cf6;
    --shop-purple-light: #a78bfa;

    --shop-cyan: #06b6d4;

    --shop-green: #22c55e;
    --shop-red: #ef4444;
    --shop-orange: #f59e0b;

    --shop-text: #ffffff;
    --shop-muted: #94a3b8;
    --shop-text-light: #cbd5e1;

    --shop-radius: 18px;
    --shop-radius-lg: 24px;
}


/* ============================================================
   CONTAINER
   ============================================================ */

.shop-wrap {
    width: 100%;
    max-width: 1080px;

    margin: 0 auto;
    padding: 0 0 20px;

    color: var(--shop-text);

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


/* ============================================================
   INTRODUCTION
   ============================================================ */

.shop-intro {
    position: relative;

    display: flex;
    align-items: center;

    gap: 20px;

    margin-bottom: 32px;
    padding: 24px;

    border-radius: var(--shop-radius-lg);

    background:
        linear-gradient(
            135deg,
            rgba(30, 42, 69, 0.9),
            rgba(24, 36, 59, 0.9)
        );

    border: 1px solid var(--shop-border);

    overflow: hidden;
}


/* Small decorative glow */

.shop-intro::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -80px;
    top: -100px;

    border-radius: 50%;

    background: rgba(139, 92, 246, 0.08);

    filter: blur(40px);

    pointer-events: none;
}


/* ============================================================
   INTRO ICON
   ============================================================ */

.shop-intro-icon {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 56px;
    height: 56px;

    border-radius: 16px;

    background: rgba(139, 92, 246, 0.1);

    border: 1px solid rgba(139, 92, 246, 0.2);

    font-size: 25px;
}


/* ============================================================
   INTRO CONTENT
   ============================================================ */

.shop-intro-content {
    position: relative;
    z-index: 2;

    flex: 1;
}


.shop-intro-title {
    margin: 0 0 5px;

    color: var(--shop-text);

    font-size: 21px;
    line-height: 1.3;

    font-weight: 800;
}


.shop-intro-text {
    margin: 0;

    max-width: 700px;

    color: var(--shop-muted);

    font-size: 14px;
    line-height: 1.6;
}


/* ============================================================
   BALANCE
   ============================================================ */

.shop-balance {
    position: relative;
    z-index: 2;

    flex-shrink: 0;

    display: flex;
    flex-direction: column;

    align-items: flex-end;

    padding-left: 20px;

    border-left: 1px solid var(--shop-border);
}


.shop-balance-label {
    margin-bottom: 3px;

    color: var(--shop-muted);

    font-size: 12px;
}


.shop-balance strong {
    color: var(--shop-purple-light);

    font-size: 19px;
    font-weight: 800;
}


.shop-balance strong span {
    color: var(--shop-muted);

    font-size: 12px;
    font-weight: 500;
}


/* ============================================================
   CATEGORY TABS + SORT TOOLBAR
   ============================================================ */

.shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;

    margin-bottom: 20px;
}


.shop-category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}


.shop-category-tab {
    cursor: pointer;

    padding: 8px 16px;

    font-size: 13px;
    font-weight: 600;
    color: var(--shop-text-light);

    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: 999px;

    transition: all 0.15s ease;
}


.shop-category-tab:hover {
    color: var(--shop-text);
    border-color: var(--shop-purple-light);
}


.shop-category-tab.is-active {
    color: #fff;

    background: var(--shop-purple);
    border-color: var(--shop-purple);
}


.shop-sort {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 13px;
    color: var(--shop-muted);
}


.shop-sort-select {
    padding: 7px 12px;

    font-size: 13px;
    font-weight: 600;
    color: var(--shop-text);

    background: var(--shop-card);
    border: 1px solid var(--shop-border);
    border-radius: 10px;

    cursor: pointer;
}


.shop-card-category {
    display: inline-block;

    margin-bottom: 6px;
    padding: 3px 10px;

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    color: var(--shop-cyan);

    background: rgba(6, 182, 212, 0.12);
    border-radius: 999px;
}


.shop-empty--filtered {
    padding: 32px 20px;
    text-align: center;
}


/* ============================================================
   REWARDS GRID
   ============================================================ */

.shop-grid {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(240px, 1fr)
        );

    gap: 20px;

    margin-bottom: 32px;
}


/* ============================================================
   REWARD CARD
   ============================================================ */

.shop-card {
    position: relative;

    display: flex;
    flex-direction: column;

    overflow: hidden;

    min-width: 0;

    background:
        linear-gradient(
            145deg,
            rgba(30, 42, 69, 0.95),
            rgba(24, 36, 59, 0.95)
        );

    border: 1px solid var(--shop-border);

    border-radius: var(--shop-radius-lg);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


.shop-card:hover:not(.shop-card--oos) {
    transform: translateY(-4px);

    border-color: rgba(139, 92, 246, 0.35);

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.25),
        0 0 25px rgba(139, 92, 246, 0.06);
}


.shop-card--oos {
    opacity: 0.55;

    filter: grayscale(30%);
}


/* ============================================================
   REWARD IMAGE
   ============================================================ */

.shop-card-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    min-height: 170px;

    padding: 20px;

    background:
        linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.025),
            rgba(255, 255, 255, 0)
        );

    border-bottom: 1px solid var(--shop-border);

    font-size: 42px;
}


.shop-card-img {
    display: block;

    width: 100%;
    max-width: 220px;

    height: 145px;

    margin: 0 auto;

    object-fit: contain;
}


/* ============================================================
   CARD BODY
   ============================================================ */

.shop-card-body {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 20px 20px 16px;
}


.shop-card-name {
    margin: 0 0 8px;

    color: var(--shop-text);

    font-size: 18px;
    line-height: 1.35;

    font-weight: 750;
}


.shop-card-desc {
    margin: 0 0 18px;

    color: var(--shop-muted);

    font-size: 14px;
    line-height: 1.6;
}


/* ============================================================
   CARD META
   ============================================================ */

.shop-card-meta {
    display: flex;

    align-items: center;
    justify-content: space-between;

    flex-wrap: wrap;

    gap: 8px;

    margin-top: auto;
}


.shop-card-price {
    color: var(--shop-purple-light);

    font-size: 15px;

    font-weight: 750;

    white-space: nowrap;
}


.shop-card-stock {
    display: inline-flex;

    align-items: center;

    padding: 4px 9px;

    border-radius: 20px;

    font-size: 11px;

    font-weight: 600;

    letter-spacing: 0.3px;
}


.shop-stock--in {
    color: #86efac;

    background: rgba(34, 197, 94, 0.1);

    border: 1px solid rgba(34, 197, 94, 0.2);
}


.shop-stock--out {
    color: #fca5a5;

    background: rgba(239, 68, 68, 0.1);

    border: 1px solid rgba(239, 68, 68, 0.2);
}


/* ============================================================
   CARD FOOTER
   ============================================================ */

.shop-card-footer {
    padding: 0 20px 20px;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.shop-btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    width: 100%;

    min-height: 44px;

    padding: 11px 16px;

    border: 0;

    border-radius: 12px;

    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    font-size: 14px;

    font-weight: 700;

    line-height: 1.2;

    cursor: pointer;

    text-align: center;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}


/* ============================================================
   CLAIM BUTTON
   ============================================================ */

.shop-btn--claim {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #7c3aed
        );

    box-shadow:
        0 6px 18px rgba(139, 92, 246, 0.18);
}


.shop-btn--claim:hover {
    transform: translateY(-2px);

    background:
        linear-gradient(
            135deg,
            #9f67ff,
            #8b5cf6
        );

    box-shadow:
        0 10px 25px rgba(139, 92, 246, 0.28);
}


/* ============================================================
   LOGIN BUTTON
   ============================================================ */

.shop-btn--login {
    color: var(--shop-text-light);

    background: transparent;

    border: 1px solid var(--shop-border);
}


.shop-btn--login:hover {
    color: var(--shop-purple-light);

    border-color: rgba(139, 92, 246, 0.4);

    background: rgba(139, 92, 246, 0.05);
}


/* ============================================================
   DISABLED BUTTON
   ============================================================ */

.shop-btn--disabled {
    color: #64748b;

    background: rgba(255, 255, 255, 0.05);

    border: 1px solid var(--shop-border);

    cursor: not-allowed;

    opacity: 0.75;
}


/* ============================================================
   EMPTY STATE
   ============================================================ */

.shop-empty {
    padding: 70px 25px;

    text-align: center;

    background:
        linear-gradient(
            145deg,
            rgba(30, 42, 69, 0.7),
            rgba(24, 36, 59, 0.7)
        );

    border: 1px solid var(--shop-border);

    border-radius: var(--shop-radius-lg);
}


.shop-empty-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 60px;
    height: 60px;

    margin: 0 auto 18px;

    border-radius: 16px;

    background: rgba(139, 92, 246, 0.08);

    font-size: 28px;

    opacity: 0.7;
}


.shop-empty h3 {
    margin: 0 0 8px;

    color: var(--shop-text);

    font-size: 21px;

    font-weight: 800;
}


.shop-empty p {
    max-width: 450px;

    margin: 0 auto;

    color: var(--shop-muted);

    font-size: 14px;

    line-height: 1.6;
}


/* ============================================================
   MODAL
   ============================================================ */

.shop-modal-overlay {
    position: fixed;

    inset: 0;

    display: flex;

    align-items: center;
    justify-content: center;

    z-index: 9999;

    padding: 20px;

    background: rgba(7, 11, 22, 0.82);

    backdrop-filter: blur(6px);
}


.shop-modal {
    width: 100%;

    max-width: 440px;

    padding: 30px;

    background: #18243b;

    border: 1px solid var(--shop-border);

    border-radius: var(--shop-radius-lg);

    box-shadow:
        0 25px 80px rgba(0, 0, 0, 0.5);
}


.shop-modal-title {
    margin: 0 0 14px;

    color: var(--shop-text);

    font-size: 22px;

    font-weight: 800;
}


.shop-modal-body {
    margin: 0 0 24px;

    color: var(--shop-text-light);

    font-size: 15px;

    line-height: 1.7;
}


.shop-modal-actions {
    display: flex;

    gap: 12px;
}


.shop-btn--cancel {
    flex: 1;

    color: var(--shop-muted);

    background: transparent;

    border: 1px solid var(--shop-border);
}


.shop-btn--cancel:hover {
    color: var(--shop-text);

    border-color: rgba(255, 255, 255, 0.15);

    background: rgba(255, 255, 255, 0.03);
}


.shop-btn--confirm {
    flex: 2;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #8b5cf6,
            #7c3aed
        );

    box-shadow:
        0 6px 18px rgba(139, 92, 246, 0.18);
}


.shop-btn--confirm:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(139, 92, 246, 0.28);
}


.shop-btn--confirm:disabled {
    opacity: 0.5;

    cursor: not-allowed;
}


/* ============================================================
   LIVE CLAIM STATUS BANNER
   ============================================================ */

.shop-live-status {
    display: flex;

    align-items: center;

    gap: 8px;

    margin-bottom: 20px;
    padding: 14px 18px;

    color: var(--shop-text-light);

    font-size: 14px;

    background: rgba(255, 255, 255, 0.03);

    border: 1px solid var(--shop-border);

    border-radius: 14px;
}


.shop-status-badge {
    display: inline-flex;

    align-items: center;

    padding: 4px 10px;

    border-radius: 20px;

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 0.2px;
}


.shop-status-badge--pending {
    color: var(--shop-orange);

    background: rgba(245, 158, 11, 0.1);

    border: 1px solid rgba(245, 158, 11, 0.25);
}


.shop-status-badge--sent {
    color: #86efac;

    background: rgba(34, 197, 94, 0.1);

    border: 1px solid rgba(34, 197, 94, 0.2);
}


/* ============================================================
   LOCKED SHOP PANEL
   ============================================================ */

.shop-locked {
    padding: 50px 25px;

    text-align: center;

    margin-bottom: 32px;

    background:
        linear-gradient(
            145deg,
            rgba(30, 42, 69, 0.9),
            rgba(24, 36, 59, 0.9)
        );

    border: 1px solid var(--shop-border);

    border-radius: var(--shop-radius-lg);
}


.shop-locked-icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 60px;
    height: 60px;

    margin: 0 auto 18px;

    border-radius: 16px;

    background: rgba(139, 92, 246, 0.08);

    font-size: 28px;
}


.shop-locked h3 {
    margin: 0 0 10px;

    color: var(--shop-text);

    font-size: 21px;

    font-weight: 800;
}


.shop-locked p {
    max-width: 460px;

    margin: 0 auto 18px;

    color: var(--shop-muted);

    font-size: 14px;

    line-height: 1.6;
}


.shop-locked-countdown {
    margin-bottom: 24px;

    color: var(--shop-purple-light);

    font-size: 28px;

    font-weight: 800;

    letter-spacing: 0.5px;
}


.shop-btn--unlock {
    display: inline-flex;

    width: auto;

    padding: 12px 26px;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #06b6d4,
            #0891b2
        );

    box-shadow:
        0 6px 18px rgba(6, 182, 212, 0.2);
}


.shop-btn--unlock:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 10px 25px rgba(6, 182, 212, 0.3);
}


.shop-btn--unlock:disabled {
    color: #64748b;

    background: rgba(255, 255, 255, 0.05);

    border: 1px solid var(--shop-border);

    box-shadow: none;

    cursor: not-allowed;

    opacity: 0.75;
}


.shop-locked-note {
    margin-top: 14px;

    color: var(--shop-muted);

    font-size: 13px;
}


/* ============================================================
   CLAIM HISTORY
   ============================================================ */

.shop-history {
    margin-bottom: 32px;
}


.shop-history-title {
    margin: 0 0 14px;

    color: var(--shop-text);

    font-size: 18px;

    font-weight: 750;
}


.shop-history-scroll {
    width: 100%;

    overflow-x: auto;

    border-radius: var(--shop-radius);
}


.shop-history-table {
    width: 100%;

    min-width: 460px;

    border-collapse: collapse;

    overflow: hidden;

    background:
        linear-gradient(
            145deg,
            rgba(30, 42, 69, 0.9),
            rgba(24, 36, 59, 0.9)
        );

    border: 1px solid var(--shop-border);

    border-radius: var(--shop-radius);
}


.shop-history-table th,
.shop-history-table td {
    padding: 12px 16px;

    text-align: left;

    font-size: 13px;

    border-bottom: 1px solid var(--shop-border);
}


.shop-history-table th {
    color: var(--shop-muted);

    font-weight: 700;

    text-transform: uppercase;

    letter-spacing: 0.3px;

    font-size: 11px;
}


.shop-history-table td {
    color: var(--shop-text-light);
}


.shop-history-table tr:last-child td {
    border-bottom: 0;
}


/* ============================================================
   MODAL FINE PRINT
   ============================================================ */

.shop-modal-fineprint {
    margin: 16px 0 0;

    padding-top: 16px;

    color: var(--shop-muted);

    font-size: 12px;

    line-height: 1.6;

    border-top: 1px solid var(--shop-border);
}


.shop-modal-fineprint a {
    color: var(--shop-purple-light);

    text-decoration: underline;
}


.shop-modal-fineprint a:hover {
    color: var(--shop-cyan);
}


/* ============================================================
   RESULT MESSAGE
   ============================================================ */

.shop-result {
    margin-top: 24px;

    padding: 15px 18px;

    border-radius: 12px;

    font-size: 14px;

    line-height: 1.6;

    text-align: center;
}


.shop-result--success {
    color: #86efac;

    background: rgba(34, 197, 94, 0.08);

    border: 1px solid rgba(34, 197, 94, 0.2);
}


.shop-result--error {
    color: #fca5a5;

    background: rgba(239, 68, 68, 0.08);

    border: 1px solid rgba(239, 68, 68, 0.2);
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {

    .shop-intro {
        align-items: flex-start;

        padding: 20px;
    }

    .shop-balance {
        padding-left: 15px;
    }

    .shop-grid {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(210px, 1fr)
            );
    }

}


@media (max-width: 600px) {

    .shop-intro {
        display: grid;

        grid-template-columns: auto 1fr;

        gap: 15px;
    }

    .shop-intro-content {
        min-width: 0;
    }

    .shop-intro-title {
        font-size: 19px;
    }

    .shop-intro-text {
        font-size: 13px;
    }

    .shop-balance {
        grid-column: 1 / -1;

        align-items: flex-start;

        padding-left: 0;
        padding-top: 14px;

        border-left: 0;

        border-top: 1px solid var(--shop-border);
    }

    .shop-grid {
        grid-template-columns: 1fr;
    }

    .shop-card-icon {
        min-height: 160px;
    }

    .shop-modal-actions {
        flex-direction: column;
    }

    .shop-btn--cancel,
    .shop-btn--confirm {
        flex: none;

        width: 100%;
    }

}


@media (max-width: 380px) {

    .shop-intro {
        padding: 17px;
    }

    .shop-card-body {
        padding-left: 17px;
        padding-right: 17px;
    }

    .shop-card-footer {
        padding-left: 17px;
        padding-right: 17px;
    }

}

/* ============================================================
   30-DAY SURVEY / OFFER WALL REDEMPTION HOLD
   ============================================================ */
.shop-balance-available,
.shop-balance-processing {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.35;
    text-align: right;
}

.shop-balance-available {
    color: var(--shop-text-light);
}

.shop-balance-processing {
    color: #fbbf24;
}

.shop-processing-note {
    margin: 8px 0 0;
    color: #fbbf24;
    font-size: 12px;
    line-height: 1.45;
    text-align: center;
}

@media (max-width: 768px) {
    .shop-balance-available,
    .shop-balance-processing {
        text-align: left;
    }
}
