/* =========================================================
   ZeroMaxShop Wheel — Rewards Hub
   One rounded rail beneath the wallet summary
========================================================= */

.wheel-earn-hub {
    width: min(920px, 100%);
    margin: -4px auto 36px;
}

.wheel-earn-hub-label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 9px 10px;
    color: rgba(238, 235, 255, 0.62);
    font-size: 0.64rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.wheel-earn-hub-label span {
    color: var(--wheel-gold, #ffd45c);
    font-size: 0.72rem;
}

.wheel-earn-rail {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--wheel-border, rgba(255, 255, 255, 0.11));
    border-radius: 22px;
    background:
        linear-gradient(
            145deg,
            rgba(31, 25, 45, 0.96),
            rgba(15, 12, 23, 0.96)
        );
    box-shadow:
        0 18px 46px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.wheel-earn-rail::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    background:
        radial-gradient(
            circle at 12% 20%,
            rgba(255, 212, 92, 0.07),
            transparent 30%
        ),
        radial-gradient(
            circle at 52% 20%,
            rgba(117, 239, 166, 0.055),
            transparent 29%
        ),
        radial-gradient(
            circle at 88% 20%,
            rgba(157, 112, 255, 0.07),
            transparent 30%
        );
    content: "";
    pointer-events: none;
}

.wheel-earn-action {
    position: relative;
    display: grid;
    grid-template-columns: 39px minmax(0, 1fr) 20px;
    align-items: center;
    gap: 12px;
    min-width: 0;
    min-height: 94px;
    padding: 17px 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--wheel-text, #f8f7ff);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition:
        background 180ms ease,
        transform 180ms ease;
}

.wheel-earn-action + .wheel-earn-action {
    border-left: 1px solid rgba(255, 255, 255, 0.09);
}

.wheel-earn-action:hover {
    background: rgba(255, 255, 255, 0.045);
}

.wheel-earn-action:active {
    transform: scale(0.992);
}

.wheel-earn-action:focus-visible {
    z-index: 2;
    outline: 2px solid rgba(255, 212, 92, 0.72);
    outline-offset: -3px;
}

.wheel-earn-action-icon {
    display: grid;
    width: 39px;
    height: 39px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 13px;
    font-size: 0.82rem;
    font-weight: 950;
    line-height: 1;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.wheel-earn-action-daily .wheel-earn-action-icon {
    border-color: rgba(255, 212, 92, 0.25);
    background: rgba(255, 212, 92, 0.11);
    color: var(--wheel-gold-bright, #fff1a8);
}

.wheel-earn-action-invite .wheel-earn-action-icon {
    border-color: rgba(117, 239, 166, 0.22);
    background: rgba(117, 239, 166, 0.09);
    color: #9af5bd;
}

.wheel-earn-action-trivia .wheel-earn-action-icon {
    border-color: rgba(157, 112, 255, 0.25);
    background: rgba(157, 112, 255, 0.12);
    color: #cdb9ff;
}

.wheel-earn-action-copy {
    display: grid;
    min-width: 0;
    line-height: 1.18;
}

.wheel-earn-action-copy small {
    margin-bottom: 6px;
    color: rgba(238, 235, 255, 0.56);
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.wheel-earn-action-copy strong {
    overflow: hidden;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 850;
    letter-spacing: -0.025em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wheel-earn-action-copy > span {
    overflow: hidden;
    margin-top: 5px;
    color: rgba(238, 235, 255, 0.62);
    font-size: 0.7rem;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wheel-earn-action-arrow {
    color: rgba(255, 255, 255, 0.42);
    font-size: 1rem;
    transition:
        color 180ms ease,
        transform 180ms ease;
}

.wheel-earn-action:hover .wheel-earn-action-arrow {
    color: #ffffff;
    transform: translateX(3px);
}

.wheel-earn-action.is-claimed .wheel-earn-action-icon {
    border-color: rgba(117, 239, 166, 0.25);
    background: rgba(117, 239, 166, 0.1);
    color: #9af5bd;
}


/* =========================
   Shared rewards modals
========================= */

.wheel-page.wheel-earn-modal-open {
    overflow: hidden;
}

.wheel-earn-modal {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
}

.wheel-earn-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(4, 3, 8, 0.76);
    cursor: default;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.wheel-earn-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 440px);
    max-height: min(720px, calc(100vh - 44px));
    overflow-y: auto;
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 25px;
    background:
        radial-gradient(
            circle at 50% 0,
            rgba(255, 212, 92, 0.08),
            transparent 34%
        ),
        linear-gradient(
            155deg,
            rgba(31, 25, 45, 0.99),
            rgba(13, 11, 20, 0.99)
        );
    color: var(--wheel-text, #f8f7ff);
    box-shadow:
        0 34px 100px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    text-align: center;
    animation: wheel-earn-modal-enter 210ms ease both;
}

.wheel-invite-modal-card {
    width: min(100%, 520px);
}

.wheel-earn-modal-close {
    position: absolute;
    top: 13px;
    right: 13px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.72);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.wheel-earn-modal-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.wheel-earn-modal-icon {
    display: grid;
    width: 58px;
    height: 58px;
    margin: 2px auto 18px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
    font-size: 1rem;
    font-weight: 950;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 12px 28px rgba(0, 0, 0, 0.18);
}

.wheel-earn-modal-icon-daily {
    border-color: rgba(255, 212, 92, 0.3);
    background: rgba(255, 212, 92, 0.12);
    color: var(--wheel-gold-bright, #fff1a8);
}

.wheel-earn-modal-icon-invite {
    border-color: rgba(117, 239, 166, 0.28);
    background: rgba(117, 239, 166, 0.1);
    color: #9af5bd;
}

.wheel-earn-modal-eyebrow {
    margin: 0 0 7px;
    color: var(--wheel-gold, #ffd45c);
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 0.17em;
    text-transform: uppercase;
}

.wheel-earn-modal-card h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.45rem, 5vw, 2rem);
    font-weight: 920;
    letter-spacing: -0.05em;
    line-height: 1.05;
}

.wheel-earn-modal-card > p:not(.wheel-earn-modal-eyebrow) {
    margin: 14px auto 20px;
    color: rgba(238, 235, 255, 0.67);
    font-size: 0.86rem;
    line-height: 1.65;
}

.wheel-earn-modal-card > p strong {
    color: #ffffff;
}

.wheel-earn-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 47px;
    padding: 0 18px;
    border: 1px solid rgba(255, 212, 92, 0.25);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            var(--wheel-gold-bright, #fff1a8),
            var(--wheel-gold, #ffd45c)
        );
    color: #09080d;
    font-size: 0.84rem;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    box-shadow:
        0 12px 30px rgba(255, 193, 59, 0.13);
    transition:
        filter 170ms ease,
        transform 170ms ease;
}

.wheel-earn-primary-button:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.wheel-earn-primary-button:disabled {
    cursor: wait;
    filter: grayscale(0.25);
    opacity: 0.65;
    transform: none;
}

.wheel-earn-modal-note,
.wheel-earn-qualification-note {
    margin-bottom: 0 !important;
    font-size: 0.7rem !important;
    line-height: 1.5 !important;
}

.wheel-earn-qualification-note {
    color: rgba(238, 235, 255, 0.43) !important;
}

.wheel-earn-message {
    margin: 0 0 15px;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(238, 235, 255, 0.78);
    font-size: 0.76rem;
    line-height: 1.5;
    text-align: left;
}

.wheel-earn-message.is-success {
    border-color: rgba(117, 239, 166, 0.22);
    background: rgba(117, 239, 166, 0.075);
    color: #baf7d0;
}

.wheel-earn-message.is-error {
    border-color: rgba(255, 119, 146, 0.24);
    background: rgba(255, 119, 146, 0.075);
    color: #ffc1ce;
}

.wheel-earn-loading {
    margin-top: 22px;
    color: rgba(238, 235, 255, 0.62);
    font-size: 0.78rem;
}


/* =========================
   Invite content
========================= */

.wheel-invite-content {
    margin-top: 22px;
    text-align: left;
}

.wheel-invite-content label {
    display: block;
    margin: 0 0 8px 2px;
    color: rgba(238, 235, 255, 0.62);
    font-size: 0.65rem;
    font-weight: 750;
}

.wheel-invite-link-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.wheel-invite-link-row input {
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    outline: none;
    background: rgba(5, 4, 9, 0.42);
    color: rgba(255, 255, 255, 0.82);
    font: inherit;
    font-size: 0.74rem;
}

.wheel-invite-link-row input:focus {
    border-color: rgba(157, 112, 255, 0.5);
}

.wheel-invite-copy-button {
    min-width: 66px;
    padding: 0 13px;
    border: 1px solid rgba(157, 112, 255, 0.24);
    border-radius: 12px;
    background: rgba(157, 112, 255, 0.1);
    color: #d6c5ff;
    font-size: 0.72rem;
    font-weight: 850;
    cursor: pointer;
}

.wheel-invite-actions {
    margin-top: 10px;
}

.wheel-invite-actions .wheel-earn-primary-button {
    border-color: rgba(117, 239, 166, 0.22);
    background:
        linear-gradient(
            145deg,
            #bcf7d1,
            #75efa6
        );
}

.wheel-invite-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.wheel-invite-stats > span {
    display: grid;
    padding: 11px 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.025);
}

.wheel-invite-stats small {
    color: rgba(238, 235, 255, 0.48);
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.wheel-invite-stats strong {
    margin-top: 4px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 900;
}


/* =========================
   Responsive
========================= */

@media (max-width: 760px) {
    .wheel-earn-hub {
        margin-bottom: 28px;
    }

    .wheel-earn-rail {
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .wheel-earn-action {
        min-height: 78px;
        padding: 14px 15px;
    }

    .wheel-earn-action + .wheel-earn-action {
        border-top: 1px solid rgba(255, 255, 255, 0.09);
        border-left: 0;
    }
}

@media (max-width: 420px) {
    .wheel-earn-hub-label {
        margin-left: 6px;
    }

    .wheel-earn-action {
        grid-template-columns: 36px minmax(0, 1fr) 16px;
        gap: 10px;
    }

    .wheel-earn-action-icon {
        width: 36px;
        height: 36px;
        border-radius: 12px;
    }

    .wheel-earn-modal {
        align-items: end;
        padding: 10px;
    }

    .wheel-earn-modal-card,
    .wheel-invite-modal-card {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 27px 19px 21px;
        border-radius: 23px;
    }
}

@keyframes wheel-earn-modal-enter {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.985);
    }

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

@media (prefers-reduced-motion: reduce) {
    .wheel-earn-action,
    .wheel-earn-action-arrow,
    .wheel-earn-primary-button,
    .wheel-earn-modal-card {
        animation: none;
        transition: none;
    }
}
