/* =========================================
   FANTOUKIS - the Drawer organizer tool (drawer.js, on make.html)
   ========================================= */
.dw { max-width: 1080px; margin: 0 auto; }
.dw[hidden] { display: none; }
.dw-head { text-align: center; margin: 4px 0 16px; }
.dw-title { font: 600 26px/1.2 var(--font-heading); margin: 0 0 4px; }
.dw-card, .dw-board, .dw-tools, .dw-buy, .dw-hints {
    background: var(--white); border: 1.5px solid var(--line); border-radius: 22px; padding: 18px;
}
.dw-card { max-width: 640px; margin: 0 auto; }
.dw-h { display: flex; align-items: center; gap: 10px; font: 600 20px/1.2 var(--font-heading); margin: 0 0 14px; }
.dw-num { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow); border: 2px solid var(--ink); font: 700 15px/1 var(--font-body); flex: none; }
.dw-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dw-field { display: grid; gap: 6px; min-width: 0; }
.dw-field-label { display: grid; gap: 0; }
.dw-field-label b { font-size: 16px; }
.dw-field-label small { color: var(--muted); font-size: 12.5px; }
.dw-input-wrap { display: flex; align-items: center; border: 2px solid var(--line); border-radius: 14px; background: var(--cream); padding: 0 12px 0 0; }
.dw-input-wrap:focus-within { border-color: var(--accent); background: var(--white); }
.dw-input { border: 0; background: transparent; font: 600 20px/1 var(--font-body); color: var(--ink); padding: 12px; width: 100%; min-width: 0; outline: none; }
.dw-input-wrap span { color: var(--muted); font-weight: 600; }
.dw-search { border: 2px solid var(--line); border-radius: 14px; background: var(--cream); font-size: 16px; font-weight: 500; }
.dw-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dw-size-actions { justify-content: space-between; margin-top: 16px; }
.dw-ikea { display: inline-flex; align-items: center; gap: 8px; background: #FFE9A8; border: 2px solid var(--ink); border-radius: 999px; padding: 10px 16px; font: 700 15px/1.2 var(--font-body); color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.dw-ikea:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.dw-link { background: none; border: 0; padding: 4px 0; color: #8A2C6E; font: 600 14.5px/1.3 var(--font-body); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; text-align: left; }
.dw-link:disabled { opacity: .4; cursor: default; }
.dw-error { color: #B8335F; font-weight: 600; margin: 10px 0 0; }
.dw-ok { color: #2E7D5B; font-weight: 600; margin: 10px 0 0; }
.dw-saved { margin: 12px 0 0; }
.dw-match { margin-top: 14px; background: #EAF7F1; border: 2px solid #8FD0B6; border-radius: 16px; padding: 12px 14px; }
.dw-match p { margin: 0 0 8px; }
.dw-dim { color: var(--muted); white-space: nowrap; }
.dw-measure { margin-top: 16px; border-top: 1.5px dashed var(--line); padding-top: 12px; }
.dw-measure summary { cursor: pointer; font-weight: 700; color: #8A2C6E; }
.dw-measure-body { display: grid; grid-template-columns: 230px 1fr; gap: 14px; align-items: center; margin-top: 10px; }
.dw-measure-art { width: 100%; height: auto; }
.dw-measure ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; font-size: 14.5px; }
.dw-small { font-size: 13px; color: var(--muted); margin: 6px 0 0; display: block; }
.dw-note { text-align: center; background: var(--yellow); border-radius: 14px; padding: 8px 12px; font-weight: 600; max-width: 640px; margin: 0 auto 12px; }

/* The plan: picture left, tools right (one column on phones) */
.dw-plan { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.dw-board-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.dw-board-head .dw-h { margin: 0; }
.dw-view { position: relative; user-select: none; -webkit-user-select: none; }
.dw-view svg { display: block; width: 100%; height: auto; max-height: 72vh; touch-action: pan-x pan-y; }
.dw-view .dw-bin, .dw-view .dw-handle { cursor: grab; touch-action: none; }
.dw-view .dw-bin.is-sel { cursor: move; }
.dw-banner { margin: 10px 0 0; padding: 9px 12px; border-radius: 12px; background: #EAF7F1; font-weight: 600; font-size: 14px; }
.dw-banner.is-warn { background: #FDE7EE; color: #8A2C6E; }
.dw-status { margin: 10px 0 0; text-align: center; color: var(--muted); font-weight: 600; }
.dw-status.is-full { color: #2E7D5B; font-size: 17px; }
.dw-side { display: grid; gap: 14px; }
.dw-tools { display: grid; gap: 14px; }
.dw-label { margin: 0 0 6px; font-weight: 700; font-size: 14.5px; }
.dw-label small { color: var(--muted); font-weight: 500; }
.dw-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.dw-chip { border: 2px solid var(--line); background: var(--cream); border-radius: 12px; padding: 8px 11px; font: 700 15px/1 var(--font-body); color: var(--ink); cursor: pointer; }
.dw-chip:hover { border-color: var(--accent); }
.dw-auto { position: relative; }
.dw-fill { width: 100%; justify-content: center; }
.dw-fill:disabled { opacity: .45; cursor: default; }
.dw-menu { display: grid; gap: 6px; margin-top: 8px; }
.dw-menu button { display: grid; gap: 2px; text-align: left; background: var(--cream); border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); }
.dw-menu button:hover { border-color: var(--accent); }
.dw-menu small { color: var(--muted); }
.dw-icons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.dw-icons button { border: 1.5px solid var(--line); background: var(--white); border-radius: 12px; padding: 9px 8px; font: 600 14px/1.1 var(--font-body); color: var(--ink); cursor: pointer; }
.dw-icons button:disabled { opacity: .38; cursor: default; }
.dw-selected { background: #FDF0F5; border-radius: 16px; padding: 12px; }
.dw-steppers { display: grid; gap: 8px; }
.dw-stepper { display: flex; align-items: center; gap: 6px; }
.dw-stepper > span:first-child { min-width: 64px; font-weight: 600; font-size: 14px; }
.dw-stepper button { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--ink); background: var(--white); font: 700 20px/1 var(--font-body); color: var(--ink); cursor: pointer; flex: none; }
.dw-stepper button:disabled { opacity: .35; cursor: default; }
.dw-stepper input { width: 64px; text-align: center; border: 2px solid var(--line); border-radius: 12px; padding: 8px 4px; font: 700 17px/1 var(--font-body); color: var(--ink); background: var(--white); }
.dw-height-val { min-width: 74px; text-align: center; font-weight: 700; }
.dw-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dw-colours { display: flex; gap: 6px; flex-wrap: wrap; }
.dw-colour { display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--line); background: var(--white); border-radius: 999px; padding: 7px 12px 7px 8px; font: 600 14px/1 var(--font-body); color: var(--ink); cursor: pointer; }
.dw-colour i { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(0,0,0,.25); }
.dw-colour.is-on { border-color: var(--ink); background: var(--yellow); }
.dw-spacers { background: #EAF7F1; border: 2.5px solid #2E7D5B; border-radius: 20px; padding: 14px 16px; }
.dw-spacers b { font: 700 17px/1.25 var(--font-heading); color: #1F5E44; }
.dw-spacers p { margin: 6px 0 0; font-size: 14px; }
.dw-buy { text-align: center; }
.dw-buy.is-full { border: 2.5px solid var(--accent); }
.dw-price-label { margin: 0; color: var(--muted); font-weight: 600; }
.dw-price { margin: 2px 0 10px; font: 700 38px/1 var(--font-heading); color: var(--accent); }
.dw-price-wait { margin: 0 0 6px; font-weight: 600; }
.dw-package { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 3px; font-size: 14.5px; }
.dw-package-spacers { color: #1F5E44; font-weight: 700; margin-top: 4px; }
.dw-add { width: 100%; justify-content: center; margin-top: 12px; font-size: 17px; }
.dw-add:disabled { opacity: .45; cursor: not-allowed; }
.dw-done { margin-top: 10px; background: #EAF7F1; border-radius: 14px; padding: 10px; display: flex; gap: 10px; align-items: center; justify-content: center; flex-wrap: wrap; }
.dw-share { margin-top: 10px; }
.dw-hints { max-width: 1080px; margin: 0 auto 14px; background: #FFF4CF; }
.dw-hints ol { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dw-hints li { display: flex; align-items: flex-start; gap: 8px; font-weight: 600; font-size: 14.5px; }
.dw-hints li span { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--white); border: 2px solid var(--ink); flex: none; font-size: 13px; }
.dw-hints li.is-done span { background: #8FD0B6; }

/* Pop-up boxes */
.dw-modal { position: fixed; inset: 0; z-index: 2000; background: rgba(43, 34, 48, .45); display: grid; place-items: center; padding: 16px; }
.dw-modal-box { background: var(--white); border-radius: 22px; width: min(560px, 100%); max-height: 86vh; overflow: auto; padding: 16px 18px 18px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.dw-modal-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.dw-modal-head h3 { margin: 0; font: 600 19px/1.2 var(--font-heading); }
.dw-x { border: 0; background: var(--cream); width: 36px; height: 36px; border-radius: 50%; font-size: 16px; cursor: pointer; flex: none; color: var(--ink); }
.dw-ikea-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.dw-ikea-list button { width: 100%; display: flex; justify-content: space-between; gap: 10px; text-align: left; background: var(--cream); border: 2px solid transparent; border-radius: 14px; padding: 11px 12px; font: 500 14.5px/1.3 var(--font-body); color: var(--ink); cursor: pointer; }
.dw-ikea-list button:hover { border-color: var(--accent); }
.dw-ikea-list b { white-space: nowrap; color: #8A2C6E; }
.dw-confirm { width: min(400px, 100%); text-align: center; }
.dw-confirm .dw-row { justify-content: center; margin-top: 12px; }
.dw-gif { width: min(400px, 100%); }
.dw-gif img { width: 100%; height: auto; border-radius: 14px; display: block; }

/* The 4 big buttons: 2 × 2 on computers */
.mk-groups.has-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 640px; }

@media (max-width: 760px) {
    .dw-plan { grid-template-columns: 1fr; }
    .dw-fields { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
    .dw-input { font-size: 18px; padding: 11px 8px; }
    .dw-field-label small { font-size: 11.5px; }
    .dw-measure-body { grid-template-columns: 1fr; }
    .dw-measure-art { max-width: 280px; margin: 0 auto; }
    .dw-card, .dw-board, .dw-tools, .dw-buy, .dw-hints { padding: 14px; border-radius: 18px; }
    .dw-board { padding: 10px; }
    .dw-hints ol { grid-template-columns: 1fr; gap: 6px; }
    .dw-title { font-size: 22px; }
    .dw-size-actions { flex-direction: column-reverse; align-items: stretch; }
    .dw-size-actions .btn, .dw-ikea { justify-content: center; }
    .mk-groups.has-4 { grid-template-columns: 1fr; }
}
