/* Wheel of Fortune - shop tab styling.
   Side panel (title + info) left, wheel right for maximum disc space.
   Icons + labels + spin button stay upright in a non-rotating overlay. */

.shop-wheel-wrap,
#shopWheelPanel {
    display: none;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    padding: 4px 0 0;
    box-sizing: border-box;
    overflow: hidden;
}

.wheel-layout {
    display: flex;
    align-items: center;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    gap: 6px;
}

.wheel-side {
    flex: 0 0 160px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-self: center;
}

.wheel-header {
    text-align: left;
    color: var(--text-main, #f8fafc);
}
.wheel-header h2 {
    margin: 0 0 6px;
    font-size: 1.3rem;
    color: #f0c66a;
    letter-spacing: .5px;
    line-height: 1.15;
}
.wheel-header p {
    margin: 0;
    color: var(--text-muted, #94a3b8);
    font-size: .82rem;
    line-height: 1.35;
}

.wheel-info-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: rgba(8, 18, 36, 0.6);
    border: 1px solid rgba(43, 108, 224, 0.25);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text-muted, #94a3b8);
    font-size: .84rem;
}
.wheel-info-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.wheel-info-bar b { color: #f0c66a; font-weight: 700; font-size: .95rem; }
.wheel-info-bar .wheel-info-divider {
    width: 100%;
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
}

.wheel-stage-col {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
    padding-right: 0;
}

.wheel-stage {
    position: relative;
    width: 500px;
    height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    flex: 0 0 auto;
}

.wheel-disc {
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 50%;
    border: 6px solid rgba(240, 198, 106, 0.85);
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.45),
                0 12px 40px rgba(0, 0, 0, 0.55),
                inset 0 0 22px rgba(0, 0, 0, 0.45);
    will-change: transform;
}

/* Faint segment divider lines (rotate with the disc). */
.wheel-spoke {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1px;
    height: 50%;
    background: rgba(255, 255, 255, 0.08);
    transform-origin: top center;
    pointer-events: none;
}

/* Non-rotating overlay: holds upright item icons. */
.wheel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 3;
}

.wheel-seg {
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    overflow: visible;
    pointer-events: none;
}
.wheel-seg-icon {
    position: absolute;
    width: 36px;
    height: 36px;
    object-fit: contain;
    image-rendering: pixelated;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.85));
}

/* Fixed center spin button (does not rotate with the disc). */
.wheel-spin-wrap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    pointer-events: none;
}
.wheel-spin-wrap .wheel-spin-btn {
    pointer-events: auto;
}

.wheel-spin-btn {
    position: relative;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    border: 3px solid rgba(240, 198, 106, 0.9);
    background: linear-gradient(180deg, #3d9e5a, #2d7a44);
    color: #fff;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6), inset 0 0 12px rgba(255, 255, 255, 0.12);
    transition: transform .12s ease, filter .12s ease;
}
.wheel-spin-btn:hover:not(:disabled) { filter: brightness(1.12); transform: scale(1.04); }
.wheel-spin-btn:active:not(:disabled) { transform: scale(0.97); }
.wheel-spin-btn:disabled { cursor: wait; opacity: .85; }
.wheel-spin-btn i { font-size: 1.35rem; }
.wheel-spin-btn span { font-size: .9rem; font-weight: 700; line-height: 1; }
.wheel-spin-btn small { font-size: .64rem; color: #ffe9a8; }
.wheel-spin-btn.is-spinning i { animation: wheel-btn-spin 1s linear infinite; }
@keyframes wheel-btn-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }

.wheel-pointer {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 16px solid transparent;
    border-right: 16px solid transparent;
    border-top: 28px solid #f0c66a;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.7));
    z-index: 6;
}

.wheel-empty {
    color: var(--text-muted, #94a3b8);
    padding: 2rem;
    text-align: center;
}

.wheel-history {
    width: 100%;
    max-width: 520px;
    margin-top: 6px;
}
.wheel-history-title {
    font-size: .85rem;
    color: var(--text-muted, #94a3b8);
    margin: 0 0 6px;
    text-align: center;
}
.wheel-history table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
    color: var(--text-main, #f8fafc);
}
.wheel-history th, .wheel-history td {
    padding: 5px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    text-align: left;
}
.wheel-history th { color: var(--text-muted, #94a3b8); font-weight: 600; }

/* In-game CEF / narrow viewport: stack info above wheel. */
.shop-vp-small .wheel-layout {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}
.shop-vp-small .wheel-side {
    flex: 0 0 auto;
    width: 100%;
}
.shop-vp-small .wheel-info-bar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 14px;
}
.shop-vp-small .wheel-info-row {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}
.shop-vp-small .wheel-info-bar .wheel-info-divider {
    width: 1px;
    height: 18px;
}
.shop-vp-small .wheel-stage-col {
    flex: 0 0 auto;
    justify-content: center;
    width: 100%;
}
.shop-vp-small .wheel-stage {
    transform: scale(0.82);
    transform-origin: center center;
}

/* Topbar: the extra Wheel tab button must not overflow into the search column. */
.shop-topbar { grid-template-columns: minmax(150px, 210px) 1fr minmax(170px, 240px); }
.shop-toolbar { gap: 5px; }
.shop-tb-btn { padding: 0.5rem 0.65rem; font-size: 0.78rem; }
