/* css/wheel-skins.css
   Unified Shop overlay, button, cards, tabs */

/* ── Shop Button (main page) ── */
#wheel-skins-button {
    position: fixed;
    right: 15px;
    top: 55px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(20, 10, 30, 0.85);
    border: 2px solid rgba(255, 215, 0, 0.5);
    color: #FFD700;
    font-size: 20px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.15);
}

#wheel-skins-button:hover {
    border-color: #FFD700;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
    transform: scale(1.08);
}

.wheel-skins-btn-icon {
    font-size: 20px;
    line-height: 1;
}

@media (max-width: 768px) {
    #wheel-skins-button {
        display: none;
    }
}

/* ── Overlay ── */
.wheel-skins-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.wheel-skins-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── Panel ── */
.wheel-skins-panel {
    width: 480px;
    max-width: 94vw;
    max-height: 85vh;
    background: linear-gradient(180deg, #1a0e2e 0%, #0d0015 100%);
    border: 1px solid rgba(255, 215, 0, 0.25);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.6), 0 0 15px rgba(255, 215, 0, 0.08);
    transform: scale(0.95);
    transition: transform 0.25s ease;
}

.wheel-skins-overlay.visible .wheel-skins-panel {
    transform: scale(1);
}

/* ── Header ── */
.wheel-skins-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.12);
}

.wheel-skins-title {
    font-size: 16px;
    font-weight: bold;
    color: #FFD700;
    letter-spacing: 3px;
}

.wheel-skins-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 24px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color 0.2s;
}

.wheel-skins-close:hover {
    color: #fff;
}

/* ── Tabs ── */
.wheel-skins-tabs {
    display: flex;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.wheel-skins-tab {
    flex: 1;
    padding: 10px 6px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.wheel-skins-tab:hover {
    color: rgba(255, 255, 255, 0.7);
}

.wheel-skins-tab.active {
    color: #FFD700;
    border-bottom-color: #FFD700;
}

/* ── Content ── */
.wheel-skins-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.wheel-skins-content::-webkit-scrollbar {
    width: 4px;
}

.wheel-skins-content::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.2);
    border-radius: 2px;
}

/* ── Grid (skin cards — 3 columns) ── */
.wheel-skins-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

/* Wide grid for consumables/equipment (1 column, list layout) */
.wheel-skins-grid.ws-grid-wide {
    grid-template-columns: 1fr;
    gap: 6px;
}

@media (max-width: 768px) {
    .wheel-skins-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Cards ── */
.ws-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

/* Wide card layout for consumables/equipment (horizontal) */
.ws-card.ws-card-wide {
    flex-direction: row;
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
}

.ws-card.ws-card-wide .ws-card-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.ws-card.ws-card-wide .ws-card-info {
    flex: 1;
    min-width: 0;
}

.ws-card.ws-card-wide .ws-card-action {
    width: auto;
    margin-top: 0;
    flex-shrink: 0;
}

.ws-card-info .ws-card-name {
    text-align: left;
    font-size: 12px;
    color: #ddd;
    font-weight: bold;
}

.ws-card-desc {
    font-size: 10px;
    color: #888;
    margin-top: 2px;
}

.ws-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.ws-card.ws-active {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.15);
}

.ws-card.ws-owned {
    border-color: rgba(0, 255, 100, 0.3);
}

.ws-card-icon {
    font-size: 28px;
    line-height: 1;
}

.ws-card-name {
    font-size: 11px;
    color: #ccc;
    text-align: center;
    line-height: 1.2;
}

.ws-card-action {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 2px;
}

/* ── Badges ── */
.ws-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-align: center;
}

.ws-badge-equipped {
    background: rgba(255, 215, 0, 0.15);
    border: 1px solid rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.ws-badge-locked {
    background: rgba(150, 100, 200, 0.1);
    border: 1px solid rgba(150, 100, 200, 0.2);
    color: #9a7fbd;
    font-style: italic;
    font-size: 8px;
    max-width: 100%;
    word-break: break-word;
}

/* ── Equip Button ── */
.ws-equip-btn {
    padding: 3px 14px;
    background: rgba(0, 200, 255, 0.1);
    border: 1px solid rgba(0, 200, 255, 0.3);
    border-radius: 5px;
    color: #00C8FF;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.ws-equip-btn:hover {
    background: rgba(0, 200, 255, 0.2);
    border-color: rgba(0, 200, 255, 0.5);
}

/* ── Buy Button ── */
.ws-buy-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 5px;
    color: #FFD700;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.ws-buy-btn:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: rgba(255, 215, 0, 0.5);
}

.ws-buy-btn.cant-afford {
    opacity: 0.4;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.1);
    color: #666;
}

/* ── Coin Dot ── */
.ws-coin-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #FFE44D, #FFD700 40%, #B8860B);
    display: inline-block;
    flex-shrink: 0;
}

/* ── Coin Bar ── */
.wheel-skins-coin-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-top: 1px solid rgba(255, 215, 0, 0.12);
    font-size: 13px;
    font-weight: bold;
    color: #FFD700;
}
