/* Flip map maker (/gifts/flip-maps/): on top of the shared maker look (/gifts/globes/maker.css). */

.fm [hidden] { display: none !important; }
.fm .wm-seg button { padding: 6px 8px; white-space: normal; line-height: 1.25; }
.fm .fm-first { margin-top: 0; }

/* the stage: walk past, the tilt slider */
.fm .wm-stagebar .wm-btn[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); }
.fm-tilt { display: inline-flex; align-items: center; gap: 8px; font-size: 0.78rem; color: var(--muted); flex: 1 1 160px; max-width: 300px; }
.fm-tilt input { flex: 1; min-width: 80px; accent-color: var(--accent); }

/* what each eye sees */
.fm-eyes { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; }
.fm-eye { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.fm-eye canvas { display: block; max-width: 100%; border-radius: 4px; cursor: pointer; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.08); image-rendering: pixelated; }
.fm-eye span { font-size: 0.8rem; text-align: center; line-height: 1.3; }
.fm-eye small { display: block; color: var(--muted); font-size: 0.72rem; }
.fm-swap { border: 0; background: var(--field); color: var(--ink); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.05rem; display: grid; place-items: center; }
.fm-swap:hover { background: #2a302d; }

/* the pairs */
.fm-pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fm-pairs button {
    display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 9px; align-items: center; text-align: left;
    border: 0; border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; padding: 9px 10px; cursor: pointer;
}
.fm-pairs button:last-child:nth-child(odd) { grid-column: 1 / -1; }
.fm-pairs button i { grid-row: 1 / 3; font-size: 1.25rem; color: var(--accent); }
.fm-pairs button b { font-size: 0.86rem; font-weight: 600; }
.fm-pairs button small { font-size: 0.72rem; color: var(--muted); line-height: 1.3; }
.fm-pairs button:hover { background: #262b29; }
.fm-pairs button[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px var(--accent); background: #1d2a27; }
.fm-chips { margin-top: 12px; }
.fm-chips .wm-chip { font-size: 0.76rem; padding: 5px 10px; }
.fm-chips .wm-chip small { color: var(--muted); font-size: 0.7rem; }

/* the place */
.fm .fm-style { margin-top: 8px; }
.fm .fm-search { margin-top: 10px; }
#fmPlaceSec > .wm-search:first-of-type { margin-top: 0; }
.fm .fm-mapwrap { max-width: none; position: relative; margin-top: 10px; }
.fm .fm-map { aspect-ratio: 4 / 3; }
.fm-frame { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* photos */
.fm-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.fm-drop {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 74px; padding: 8px;
    border: 1.5px dashed rgba(236, 238, 233, 0.22); border-radius: 10px; cursor: pointer; text-align: center; font-size: 0.8rem; color: var(--muted);
}
.fm-drop:hover, .fm-drop.fm-over { border-color: var(--accent); color: var(--ink); }
.fm-drop i { font-size: 1.4rem; }
.fm-drop span { overflow-wrap: anywhere; }
.fm-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.fm-photo .wm-range { margin-top: 8px; font-size: 0.78rem; }

/* colours */
.fm-side { margin-top: 14px; }
.fm-sidehead { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.86rem; }
.fm-sidehead b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm .fm-k { display: inline-flex; flex: none; }
.fm .fm-k button { padding: 3px 9px; font-size: 0.78rem; }
.fm .fm-k button:disabled { opacity: 0.3; cursor: default; }
.fm-swatches { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 0.78rem; color: var(--muted); }
.fm-swatches li { display: flex; align-items: center; gap: 6px; }
.fm-swatches li.fm-unused { opacity: 0.4; }
.fm-sw { position: relative; display: block; width: 22px; height: 22px; cursor: pointer; }
.fm-sw input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.fm-sw i { display: block; width: 22px; height: 22px; border-radius: 6px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); pointer-events: none; }
.fm-undo { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 0.85rem; padding: 0 2px; }
.fm-undo:hover { color: var(--ink); }
.fm-pick { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 0.82rem; }
.fm-pick > span { flex: none; width: 104px; color: var(--muted); }
.fm-dots { display: flex; flex-wrap: wrap; gap: 6px; }
.fm-dot { width: 22px; height: 22px; border-radius: 50%; border: 0; cursor: pointer; padding: 0; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2); }
.fm-dot.fm-auto { width: auto; border-radius: 11px; padding: 0 8px; background: var(--field); color: var(--muted); font: inherit; font-size: 0.72rem; }
.fm-dot[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--ink); }
.fm-dot.fm-auto[aria-pressed="true"] { color: var(--ink); }
.fm-fil { margin: 12px 0 0; font-size: 0.82rem; }
.fm-fil.fm-over { color: #f3d38a; }

/* size and finish */
.fm .fm-dir { margin-top: 10px; }
.fm-adv { margin-top: 14px; font-size: 0.86rem; }
.fm-adv summary { cursor: pointer; color: var(--muted); }
.fm-adv summary:hover { color: var(--ink); }

.fm-warn { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.fm-warn:empty { display: none; }
.fm-warn li { font-size: 0.78rem; line-height: 1.4; color: #f3d38a; background: rgba(217, 177, 74, 0.1); border-radius: 8px; padding: 7px 9px; }

@media (max-width: 560px) {
    .fm .wm-stagebar .wm-btn span { display: none; }
    .fm-pairs { grid-template-columns: minmax(0, 1fr); }
    .fm-photos { grid-template-columns: minmax(0, 1fr); }
}

/* the map credit line: dark links on its white box */
.fm .maplibregl-ctrl-attrib a { color: #24302c; }
