/* Map vote page. Components and colours live in rp.css - only what this page adds goes here. */

.mv-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }
.mv-head .rp-input { width: auto; max-width: 100%; }
.mv-head-side { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mv-section { margin-bottom: 16px; }

/* ---- Server card: name + status, voting/wipe times, then a footer row with the vote count and time zone ---- */
.mv-server-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; padding: 20px; }
.mv-server-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.mv-warn { flex-basis: 100%; margin: 0; font-size: 12px; color: var(--rp-warn-text); }
.mv-times { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.mv-time { min-width: 170px; padding: 10px 14px; border: 1px solid var(--rp-line); border-radius: var(--rp-radius); background: var(--rp-card); }
.mv-time dd { margin: 2px 0 0; font-weight: 600; color: var(--rp-white); }
.mv-time-open { border-color: #22c55e66; } .mv-time-open dd { color: var(--rp-ok-text); }
.mv-time-upcoming { border-color: #f59e0b66; } .mv-time-upcoming dd { color: var(--rp-warn-text); }
.mv-time-closed { border-color: #ef444466; } .mv-time-closed dd { color: var(--rp-danger-text); }
.mv-countdown { font-family: var(--rp-font-mono); font-variant-numeric: tabular-nums; }
.mv-server-foot {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px;
    padding: 10px 20px; border-top: 1px solid var(--rp-line); background: var(--rp-card);
    font-size: 12px; color: var(--rp-ink-muted);
}
.mv-tz { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.mv-tz .rp-input { width: auto; max-width: 240px; padding: 4px 8px; font-size: 12px; }

/* ---- Map cards ---- */
.mv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin-bottom: 24px; }
.mv-map { transition: border-color var(--rp-ease); }
.mv-map:hover { border-color: var(--rp-line-strong); }
.mv-map.is-mine { border-color: var(--rp-accent); }
/* The map last opened on RustMaps keeps a red ring, so people find their place when they come back */
.mv-map.is-viewed { border-color: var(--rp-accent); box-shadow: 0 0 0 2px var(--rp-accent), 0 0 18px #e5483b73; }
.mv-thumb { position: relative; display: block; aspect-ratio: 1; background: var(--rp-card); }
.mv-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mv-badge { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: var(--rp-radius-sm); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--rp-base); }
.mv-badge-win { background: var(--rp-ok); }
.mv-badge-lead { background: var(--rp-warn); }
.mv-badge-viewed { display: none; right: 8px; left: auto; background: var(--rp-accent); color: #fff; }
.mv-map.is-viewed .mv-badge-viewed { display: block; }
.mv-map-body { display: grid; gap: 8px; padding: 12px; }
.mv-map-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--rp-white); }
.mv-meta { margin: 0; font-size: 12px; color: var(--rp-ink-muted); }
.mv-bar { height: 6px; overflow: hidden; border-radius: 999px; background: var(--rp-raised); }
.mv-bar span { display: block; height: 100%; background: var(--rp-accent); }
.mv-votes { display: flex; justify-content: space-between; font-size: 12px; color: var(--rp-ink); }
.mv-votes .rp-num { color: var(--rp-ink-muted); }
.mv-full { width: 100%; }
.mv-empty { padding: 40px 20px; text-align: center; color: var(--rp-ink-muted); }

/* "How map voting works": plain text below the maps - no card, so it doesn't compete with them */
.mv-howto { margin: 32px 0 24px; padding: 0 4px; }
.mv-howto h2 { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mv-howto h2 svg { width: 14px; height: 14px; color: var(--rp-accent); }
.mv-howto p { margin: 0; max-width: 820px; color: var(--rp-ink-muted); line-height: 1.6; }
.mv-howto .mv-howto-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--rp-ink-faint); }
.mv-howto-note svg { width: 14px; height: 14px; flex-shrink: 0; }

@media (max-width: 640px) {
    .mv-time { flex: 1 1 140px; min-width: 0; }
    .mv-tz { width: 100%; margin-left: 0; }
    .mv-tz .rp-input { flex: 1; min-width: 0; max-width: none; }
}
.mv-warn-text { color: var(--rp-warn-text); }
