/* Hangar shop. */

.coin {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #ffe680, #f5b700 60%, #b98700);
    border: 1px solid #9a7000;
    vertical-align: -2px;
}

.wallet {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 12px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 16px;
}

.btn.shop-open-btn {
    background: #f5a623;
    margin-left: 10px;
}

.shop {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    padding: 20px 16px;
    background: rgba(0, 0, 0, 0.45);
}

.shop[hidden] {
    display: none;
}

.shop-panel {
    width: 100%;
    max-width: 860px;
    padding: 24px 30px 30px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
}

.shop-header {
    display: flex;
    align-items: center;
}

.shop-header h2 {
    margin-right: auto;
}

.close-shop {
    margin-left: 16px;
    border: none;
    background: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
}

.shop-panel h3 {
    font-weight: 800;
    font-size: 26px;
    margin: 18px 0 8px;
}

.shop-note {
    margin-top: 0;
    font-size: 16px;
    color: #666;
}

.shop-planes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 18px 12px;
}

.shop-plane {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    border: 2px solid #eee;
    border-radius: 8px;
    text-align: center;
}

.shop-plane {
    position: relative;
}

.shop-plane.selected {
    border-color: #0a0;
}

/* Special planes (F-16, A-10, F-22) get a black border. */
.shop-plane.special {
    border: 3px solid #000;
    background: linear-gradient(180deg, #f4f6f8 0%, #fff 45%);
}

.shop-plane.special.selected {
    box-shadow: 0 0 0 3px #0a0;
}

/* Exclusive planes (B-2) get a gold border. */
.shop-plane.exclusive {
    border: 3px solid #d4a017;
    background: linear-gradient(180deg, #fff6d6 0%, #fff 45%);
}

.shop-plane.exclusive.selected {
    box-shadow: 0 0 0 3px #0a0;
}

.special-badge {
    position: absolute;
    top: -11px;
    left: 50%;
    transform: translateX(-50%);
    padding: 1px 8px;
    border-radius: 10px;
    background: #000;
    color: #ffd66b;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.exclusive-badge {
    background: #d4a017;
    color: #000;
}

.plane-perk {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.plane-perk kbd {
    margin: 0 2px;
}

.flare {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 20%, #ffd66b 45%, #ffb02e 75%);
    box-shadow: 0 0 4px #ffb02e;
}

.shop-plane img {
    width: 72px;
    height: 44px;
}

.shop-plane small {
    font-size: 15px;
    color: #555;
    min-height: 36px;
}

.stats-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 3px 8px;
    align-items: center;
    width: 100%;
    font-size: 14px;
    text-align: left;
}

.stat-bar {
    height: 6px;
    background: #eee;
    border-radius: 3px;
    overflow: hidden;
}

.stat-bar > span {
    display: block;
    height: 100%;
    background: #52a1ff;
}

.shop-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-width: 90px;
    margin-top: auto;
    padding: 4px 12px;
    border: none;
    border-radius: 5px;
    background: #0a0;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.shop-btn.buy {
    background: #f5a623;
}

.shop-btn:disabled {
    opacity: 0.45;
    cursor: default;
}

.shop-btn.equipped {
    opacity: 1;
    background: #888;
}

.shop-upgrades {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.shop-upgrade {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border: 2px solid #eee;
    border-radius: 8px;
}

.shop-upgrade small {
    font-size: 15px;
    color: #555;
}

.shop-upgrade .shop-btn {
    margin-top: 0;
}

.pips {
    display: flex;
    gap: 3px;
}

.pip {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: #ddd;
}

.pip.on {
    background: #0a0;
}

.hud-coins {
    position: absolute;
    top: 10px;
    right: 320px;
    display: flex;
    padding: 2px 8px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 5px;
}

.hud-coins,
.coin-message {
    align-items: center;
    gap: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-weight: 700;
    font-size: 16px;
}

@media only screen and (max-width: 500px) {
    .shop-panel {
        padding: 18px 16px;
    }

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

    .shop-upgrade .pips {
        grid-row: 2;
    }
}

/* Paint */

.shop-paint {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.paint-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 100px;
    border-radius: 10px;
    background: linear-gradient(180deg, #9be2fe, #d6f1ff);
}

.paint-preview img {
    width: 144px;
    height: 88px;
}

.paint-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 440px;
}

.paint-swatch {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.25);
    cursor: pointer;
    font-size: 13px;
    color: #666;
}

.paint-swatch.factory {
    background: repeating-linear-gradient(45deg, #fff, #fff 4px, #eee 4px, #eee 8px);
}

.paint-swatch.active {
    border: 3px solid #0a0;
    box-shadow: 0 0 0 2px #fff inset;
}

/* Paint patterns (Hangar and in-activity menu). */
.pattern-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.pattern-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 4px 6px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    font: inherit;
    font-size: 11px;
    cursor: pointer;
}

.pattern-btn img {
    width: 48px;
    height: 29px;
}

.pattern-btn.active {
    border-color: #0a0;
    box-shadow: 0 0 0 2px #0a0;
}
