/*
 * mapselect.css — "Pilih Map", NEW_UI's own reskin of the map-selection step
 * (js/pages/mapselect.js — see its header comment). Same tan-panel/ui-card
 * conventions as the rest of NEW_UI instead of Phaser MapSelectScene's
 * Cinzel/near-black-red DOM styling: a card grid on the warm dark .app-bg,
 * cream/amber text, orange accent for the primary action.
 */

.ms2-main {
    position: relative; z-index: 2; flex: 1;
    display: flex; flex-direction: column; gap: 12px;
    padding: 16px 20px; min-height: 0;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.ms2-header { display: flex; align-items: center; gap: 16px; padding: 14px 18px; flex-shrink: 0; }
.ms2-title { flex: 1; text-align: center; }
.ms2-title-sub { font-size: 10.5px; letter-spacing: 4px; color: rgba(58,36,16,.5); margin-bottom: 3px; }
.ms2-title-main { font-family: var(--font-title); font-size: 18px; font-weight: 900; letter-spacing: 3px; color: #2c1a08; }
.ms2-plvl { flex-shrink: 0; text-align: right; }
.ms2-plvl-lbl { font-size: 9px; letter-spacing: 1.5px; color: #8a6a48; }
.ms2-plvl-val { font-size: 16px; font-weight: 800; font-family: var(--font-mono); color: #c8641a; }

/* ── Card grid ───────────────────────────────────────────────────────────── */

.ms2-grid {
    flex: 1; min-height: 0; overflow-y: auto;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px; padding: 6px 2px 10px;
    align-content: start;
}
.ms2-empty { grid-column: 1 / -1; text-align: center; color: rgba(255,232,160,.4); font-size: 12px; letter-spacing: 2px; padding: 60px 0; }

.ms2-card {
    background: rgba(58,36,16,.35); border: 1.5px solid rgba(255,216,138,.15);
    border-radius: 14px; overflow: hidden; cursor: pointer;
    display: flex; flex-direction: column;
    transition: transform .2s cubic-bezier(.22,.68,0,1.15), border-color .2s, box-shadow .2s;
}
.ms2-card:hover { transform: translateY(-4px); border-color: rgba(255,180,80,.4); }
.ms2-card.active {
    border-color: rgba(255,200,60,.85);
    box-shadow: 0 0 0 2px rgba(255,200,60,.2), 0 10px 26px rgba(0,0,0,.35);
}
.ms2-card.locked { cursor: not-allowed; filter: saturate(.2) brightness(.65); }
.ms2-card.locked:hover { transform: none; }

.ms2-card-preview {
    position: relative; width: 100%; height: 120px; flex-shrink: 0;
    background: rgba(0,0,0,.35); overflow: hidden;
}
.ms2-card-preview img { width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.ms2-card-preview.ms2-preview-fallback::after {
    content: '🗺️'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 40px;
}
.ms2-grade-badge {
    position: absolute; top: 8px; right: 8px;
    font-size: 11.5px; font-weight: 900; padding: 2px 9px; border-radius: 5px;
    letter-spacing: 1px; border: 1px solid;
}
.ms2-lock-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,.55);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.ms2-lock-icon { font-size: 24px; }
.ms2-lock-lbl { color: var(--c-cream); font-size: 10.5px; letter-spacing: 1.5px; }

.ms2-card-body { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 12px 14px 14px; }
.ms2-zone { font-size: 10px; letter-spacing: 2.5px; color: rgba(255,180,80,.5); }
.ms2-name { font-family: var(--font-title); font-size: 15px; font-weight: 800; color: var(--c-cream); line-height: 1.25; }
.ms2-diff { font-size: 11.5px; color: #ffd700; }
.ms2-diff-lbl { color: rgba(255,232,160,.55); letter-spacing: .5px; }
.ms2-desc { font-size: 12px; color: rgba(255,232,160,.5); line-height: 1.5; flex: 1; }
.ms2-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.ms2-tag {
    font-size: 9px; padding: 2px 8px; border-radius: 999px;
    border: 1px solid rgba(255,180,80,.3); color: rgba(255,200,120,.7);
    letter-spacing: .5px;
}
.ms2-obstacles { font-size: 10.5px; color: rgba(255,232,160,.4); margin-top: 2px; }

/* ── Start button ────────────────────────────────────────────────────────── */

.ms2-start-btn { flex-shrink: 0; width: 100%; padding: 15px 12px; font-size: 13px; letter-spacing: 2px; }

@container (max-width: 560px) {
    .ms2-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    .ms2-title-main { font-size: 14px; letter-spacing: 1.5px; }
}
