/*
 * designer-coaster.css — the "Coaster Alas Gelas" designer (the shared pieces — mode switch, tabs, font cards,
 * colour pop-over, warnings — are in designer-gantungan_nama.css, the badges in designer-clicker_karakter.css'
 * look are repeated here): the three-way artwork switch, the motif grid with SVG thumbnails (coloured through
 * --cs-base / --cs-art, set by designer-coaster.js), the set slots and the "with a glass" toggle on the stage.
 */
.designer-coaster .designer-canvas {
    background: radial-gradient(120% 95% at 50% 0%, #ffffff 0%, #fdf3ee 52%, #f6e2da 100%); }

.cs-badges { display: flex; flex-wrap: wrap; gap: 6px 8px; margin: 10px 0 0; }
.cs-badges span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--tint-1); color: var(--accent-text); font-size: .8rem; font-weight: 650; }
.cs-badges .icon { width: 14px; height: 14px; }

.cs-src { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cs-src .rl-mode-btn > span { padding: 9px 6px; white-space: normal; text-align: center; line-height: 1.15; font-size: .9rem; gap: 6px; }

.ochips-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ochips-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ochips-5 { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ochips-2 .ochip > span, .ochips-4 .ochip > span, .ochips-5 .ochip > span { padding: 8px 6px; height: 100%; }

/* motif grid: an SVG thumbnail of each scene in the design's colours */
.cs-motifs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; --cs-base: #26232f; --cs-art: #f08a2c; }
.cs-motif { position: relative; cursor: pointer; min-width: 0; }
.cs-motif input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cs-motif > span { display: grid; justify-items: center; gap: 4px; padding: 7px 5px 8px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface);
    transition: border-color .12s, transform .12s, box-shadow .12s; height: 100%; }
.cs-motif small { font-size: .74rem; font-weight: 650; line-height: 1.2; text-align: center; color: var(--ink-2); }
.cs-motif:hover > span { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 10px 20px -14px rgba(40, 20, 80, .5); }
.cs-motif input:checked + span { border-color: var(--accent); background: var(--tint-1); box-shadow: inset 0 0 0 1px var(--accent); }
.cs-motif input:checked + span small { color: var(--accent-text); }
.cs-motif input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.cs-motif-th, .cs-slot-th { display: block; width: 100%; max-width: 86px; aspect-ratio: 1; border-radius: 50%; background: color-mix(in srgb, var(--cs-base) 20%, #fff); }
.cs-motif-th svg, .cs-slot-th svg { display: block; width: 100%; height: 100%; }
.cs-th-base { fill: var(--cs-base); }
.cs-th-art { fill: var(--cs-art); }

/* the set: one button per coaster, the chosen one edits */
.cs-slots-wrap { display: grid; gap: 6px; margin-top: 4px; }
.cs-slots { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; --cs-base: #26232f; --cs-art: #f08a2c; }
.cs-slot { appearance: none; position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 4px 4px; border: 1px solid var(--line-2); border-radius: 12px;
    background: var(--surface); cursor: pointer; font: inherit; color: var(--ink-2); min-width: 0; transition: border-color .12s, box-shadow .12s; }
.cs-slot b { font-size: .72rem; font-weight: 750; }
.cs-slot .cs-slot-th { max-width: 52px; }
.cs-slot:hover { border-color: var(--accent); }
.cs-slot[aria-pressed="true"] { border-color: var(--accent); background: var(--tint-1); box-shadow: inset 0 0 0 1px var(--accent); color: var(--accent-text); }
.cs-slot:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.cs-slot[hidden] { display: none; }

/* "with a glass" toggle in the bottom-left corner of the 3D stage */
.cs-view { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: inline-flex; padding: 3px; border-radius: 999px;
    background: rgba(255, 255, 255, .88); box-shadow: 0 4px 14px -6px rgba(40, 20, 80, .35); }
.cs-view button { appearance: none; border: 0; background: transparent; font: inherit; font-size: .78rem; font-weight: 650; color: var(--ink-2);
    padding: 6px 12px; border-radius: 999px; cursor: pointer; transition: background .12s, color .12s; }
.cs-view button[aria-pressed="true"] { background: var(--accent); color: #fff; }
.cs-view button:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 1px; }

@media (max-width: 900px) {
    .designer-coaster .designer-canvas { aspect-ratio: 1 / 1; max-height: 58vh; }
    .designer-coaster .designer-buy { position: sticky; bottom: 0; z-index: 5; background: var(--surface); padding: 0 8px 12px; margin: 0 -8px;
        box-shadow: 0 -12px 18px -14px rgba(40, 20, 80, .35); }
}
@media (max-width: 480px) {
    .cs-motifs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .cs-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ochips-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ochips-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cs-src .rl-mode-btn > span { font-size: .8rem; gap: 4px; }
    .cs-src .rl-mode-btn .icon { width: 15px; height: 15px; }
}
