/* PlakLab Ontwerp Studio v2 — monochrome; blue only for selection. */

/* Product page: the studio uses the full width, like v1. */
.woocommerce div.product:has(.pls-studio) { display: block; }
.woocommerce div.product:has(.pls-studio) div.images { display: none; }
.woocommerce div.product:has(.pls-studio) div.summary { float: none !important; width: 100% !important; max-width: none; border: 0; background: transparent; box-shadow: none; padding: 0; }
.woocommerce div.product:has(.pls-studio) .summary > :is(.product_title, .price, .woocommerce-product-rating, .woocommerce-product-details__short-description) { display: none; }
.plaklab-design-studio-form:has(.pls-studio) { margin: 0 !important; }

.pls-studio {
  --ink: #111111; --muted: #4a4a46; --line: #e4e4e0; --line-2: #e0e0db; --field: #d6d6d1;
  --soft: #f4f4f1; --stage: #ecece8; --dot: #cfcfca; --sel: #2f5bff; --danger: #b42318;
  --shadow: 0 1px 2px rgba(0,0,0,.06), 0 10px 28px rgba(0,0,0,.14);
  position: relative;
  width: 100%;
  margin: 0;
  display: flex; flex-direction: column;
  min-height: min(900px, calc(100vh - 120px));
  background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; overflow: clip;
  font: 400 14px/1.45 Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  text-align: left;
}
.pls-studio *, .pls-studio *::before, .pls-studio *::after { box-sizing: border-box; }
.pls-studio button { font-family: inherit; color: inherit; }
.pls-studio :is(button, input, select, textarea):focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.pls-studio h2 { margin: 0; font: 700 18px/1.2 "Space Grotesk", Inter, sans-serif; color: var(--ink); letter-spacing: -0.01em; }
.pls-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pls-muted { color: var(--muted); font-size: 12px; }
.pls-strong { font-weight: 500; }
.pls-studio [hidden] { display: none !important; }

/* Header */
.pls-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--line); }
.pls-brand { display: flex; align-items: center; gap: 14px; }
.pls-wordmark { font: 400 26px/1 "Space Grotesk", sans-serif; letter-spacing: -0.055em; }
.pls-wordmark b { font-weight: 700; }
.pls-title { margin: 0; font: 700 18px/1.2 "Space Grotesk", sans-serif; letter-spacing: -0.01em; }
.pls-divider { width: 1px; height: 24px; background: var(--line); display: inline-block; }
.pls-head-tools { display: flex; align-items: center; gap: 4px; }
.pls-head-tools .pls-divider { margin: 0 8px; }
.pls-zoom-label { min-width: 48px; text-align: center; font-weight: 500; }
.pls-icon-btn { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 10px; background: transparent; cursor: pointer; padding: 0; }
.pls-icon-btn:hover:not(:disabled) { background: var(--soft); }
.pls-icon-btn:disabled { opacity: .35; cursor: default; }
.pls-btn { min-height: 44px; padding: 0 16px; border: 1px solid var(--field); border-radius: 10px; background: #fff; font-size: 14px; font-weight: 500; cursor: pointer; }
.pls-btn:hover { background: var(--soft); }
.pls-btn-dark { background: var(--ink); color: #fff !important; border-color: var(--ink); font-weight: 600; }
.pls-btn-dark:hover { background: #333; }

/* Body */
.pls-body { flex: 1; display: flex; min-height: 0; }
.pls-rail { width: 92px; flex: none; display: flex; flex-direction: column; gap: 4px; padding: 12px 8px; border-right: 1px solid var(--line); }
.pls-rail-btn { min-width: 72px; height: 68px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 12px; background: transparent; font-size: 12px; font-weight: 500; cursor: pointer; padding: 0; }
.pls-rail-btn svg { width: 22px; height: 22px; }
.pls-rail-btn:hover, .pls-rail-btn[aria-pressed="true"] { background: #ededea; }

.pls-stage { position: relative; flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 20px 32px 28px; background-color: var(--stage); background-image: radial-gradient(var(--dot) 1px, transparent 1px); background-size: 20px 20px; }
.pls-stage-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); width: 100%; max-width: 1100px; margin: 0 auto; }
.pls-board-wrap { flex: 1; display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 72px 8px 48px; }
.pls-board { position: relative; flex: none; container-type: inline-size; border-radius: 4px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 14px 36px rgba(0,0,0,.10); }

/* Elements on the board */
.pls-item { position: absolute; display: flex; align-items: center; justify-content: center; margin: 0; padding: 0; border: 0; background: none; cursor: grab; touch-action: none; user-select: none; outline: 0; }
.pls-item:not(.is-locked):hover { outline: 1px dashed rgba(47,91,255,.55); outline-offset: 2px; }
.pls-item.is-selected { outline: 2px solid var(--sel); outline-offset: 2px; z-index: 5; }
.pls-item.is-dragging { cursor: grabbing; }
.pls-item.is-locked { pointer-events: none; }
.pls-item:focus-visible { outline: 2px solid var(--sel); outline-offset: 4px; }
.pls-item-inner { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; white-space: pre; text-align: center; font-synthesis: none; pointer-events: none; }
.pls-item.is-rect .pls-item-inner, .pls-item.is-line .pls-item-inner { background: currentColor; }
.pls-item.is-circle .pls-item-inner { background: currentColor; border-radius: 50%; }
.pls-item :is(svg, img) { width: 100%; height: 100%; display: block; object-fit: contain; }
.pls-hours-block { flex-direction: column; align-items: stretch; justify-content: center; white-space: nowrap; }
.pls-hours-block > span { display: flex; justify-content: space-between; gap: 1.2em; }
.pls-handle { position: absolute; width: 8px; height: 8px; background: #fff; border: 2px solid var(--sel); border-radius: 2px; }
.pls-handle.is-tl { left: -7px; top: -7px; } .pls-handle.is-tr { right: -7px; top: -7px; }
.pls-handle.is-bl { left: -7px; bottom: -7px; } .pls-handle.is-br { right: -7px; bottom: -7px; }
.pls-dims { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); white-space: nowrap; background: var(--sel); color: #fff; font: 600 12px/1.4 Inter, sans-serif; padding: 3px 8px; border-radius: 6px; pointer-events: none; }

/* Floating toolbar */
.pls-toolbar { position: absolute; z-index: 20; display: flex; align-items: center; gap: 2px; padding: 6px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow); white-space: nowrap; max-width: calc(100% - 16px); }
.pls-tb-font select { height: 36px; max-width: 150px; border: 1px solid var(--line-2); border-radius: 9px; padding: 0 8px; font-size: 13px; background: #fff; cursor: pointer; }
.pls-tb-sep { width: 1px; height: 24px; background: var(--line); margin: 0 6px; flex: none; }
.pls-tb-quick { display: flex; }
.pls-tb-btn { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 9px; background: transparent; cursor: pointer; padding: 0; flex: none; }
.pls-tb-btn svg { width: 18px; height: 18px; }
.pls-tb-btn:hover { background: var(--soft); }
.pls-tb-btn.is-danger { color: var(--danger); }
.pls-tb-size { min-width: 52px; text-align: center; font-size: 13px; font-weight: 500; }
.pls-tb-pal { position: relative; }
.pls-tb-color { height: 36px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px 0 6px; border: 1px solid var(--line-2); border-radius: 9px; background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.pls-tb-color svg { width: 14px; height: 14px; }
.pls-chip { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #bdbdb8; flex: none; }
.pls-chip-lg { width: 28px; height: 28px; border-radius: 7px; }
.pls-popover { position: absolute; top: calc(100% + 10px); left: 50%; transform: translateX(-50%); width: 336px; max-height: 380px; overflow-y: auto; padding: 14px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; box-shadow: 0 12px 32px rgba(0,0,0,.16); white-space: normal; display: flex; flex-direction: column; gap: 12px; z-index: 30; }
.pls-pal-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pls-pal-head strong { font: 700 15px/1.2 "Space Grotesk", sans-serif; }
.pls-pal-head span { font-size: 12px; color: var(--muted); }
.pls-pal-current { font-size: 13px; font-weight: 500; }
.pls-warn { margin: 0; font-size: 12px; color: var(--danger); font-weight: 500; }

/* Swatches */
.pls-pal-group { display: flex; flex-direction: column; gap: 6px; }
.pls-pal-group-name { font-size: 12px; font-weight: 600; color: var(--muted); }
.pls-pal-swatches { display: flex; flex-wrap: wrap; gap: 2px; }
.pls-swatch { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; padding: 0; cursor: pointer; }
.pls-popover .pls-swatch { width: 36px; height: 36px; }
.pls-swatch span { display: block; width: 28px; height: 28px; border-radius: 7px; background: var(--sw); border: 1px solid rgba(0,0,0,.14); }
.pls-swatch[aria-pressed="true"] span { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--sel); }
.pls-swatch-round { width: 32px; height: 36px; }
.pls-swatch-round span { width: 22px; height: 22px; border-radius: 50%; border-color: #bdbdb8; }

/* Right panel */
.pls-panel { flex: 0 1 340px; min-width: 300px; display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.pls-panel-body { flex: 1; padding: 20px; overflow-y: auto; }
.pls-panel-body > section { display: flex; flex-direction: column; gap: 16px; }
.pls-panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.pls-panel-title span { font-size: 13px; color: var(--muted); }
.pls-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 500; margin: 0; }
.pls-field :is(input:not([type=range]):not([type=checkbox]), select, textarea) { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid var(--field); border-radius: 10px; font: 400 14px/1.4 Inter, sans-serif; background: #fff; color: var(--ink); margin: 0; }
.pls-field textarea { resize: vertical; min-height: 76px; }
.pls-field input[type=range] { accent-color: var(--ink); width: 100%; min-height: 28px; }
.pls-row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pls-row-between small { font-weight: 400; color: var(--muted); font-size: 12px; }
.pls-current-color { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line-2); border-radius: 10px; font-weight: 500; font-size: 14px; }
.pls-pal-scroll { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.pls-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pls-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pls-grounds { display: flex; gap: 8px; }
.pls-ground { flex: 1; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--field); border-radius: 10px; background: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.pls-ground span { width: 18px; height: 18px; border-radius: 50%; border: 1px solid #bdbdb8; }
.pls-ground[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.pls-check { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; cursor: pointer; font-weight: 500; }
.pls-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.pls-check small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.pls-hint { margin: 0; padding: 14px; background: var(--soft); border-radius: 12px; font-size: 14px; line-height: 1.5; color: #333330; }
.pls-tile { min-height: 96px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 13px; cursor: pointer; }
.pls-tile:hover, .pls-icon-tile:hover { border-color: var(--ink); }
.pls-icon-tile { min-height: 72px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 6px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; font-size: 12px; cursor: pointer; }
.pls-icon-tile svg { width: 24px; height: 24px; }
.pls-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 16px; border: 2px dashed #c9c9c4; border-radius: 14px; text-align: center; font-size: 14px; color: #333330; cursor: pointer; }
.pls-drop svg { width: 28px; height: 28px; }
.pls-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.pls-hours { display: flex; flex-direction: column; gap: 6px; }
.pls-hours-row { display: grid; grid-template-columns: 64px 1fr auto 1fr; align-items: center; gap: 6px; }
.pls-hours-row input[type=time] { width: 100%; min-height: 40px; border: 1px solid var(--field); border-radius: 9px; padding: 0 6px; font: inherit; }
.pls-hours-row input[type=time]:disabled { background: var(--soft); color: #8a8a85; }
.pls-day { display: flex; align-items: center; gap: 6px; font-weight: 600; min-height: 44px; cursor: pointer; }
.pls-day input { width: 18px; height: 18px; accent-color: var(--ink); }

/* Order summary, always visible */
.pls-summary { padding: 18px 20px 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; background: #fafaf8; }
.pls-summary dl { margin: 0; display: grid; grid-template-columns: 1fr auto; row-gap: 6px; column-gap: 12px; font-size: 14px; }
.pls-summary dt { color: var(--muted); }
.pls-summary dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.pls-stepper { display: flex; align-items: center; border: 1px solid var(--field); border-radius: 10px; background: #fff; }
.pls-stepper button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 18px; cursor: pointer; }
.pls-stepper input { width: 48px; height: 44px; border: 0; text-align: center; font: 600 15px/1 Inter, sans-serif; background: transparent; -moz-appearance: textfield; }
.pls-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pls-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pls-price strong { font: 700 24px/1.1 "Space Grotesk", sans-serif; }
.pls-cart-slot .single_add_to_cart_button { width: 100% !important; min-height: 52px; display: inline-flex !important; align-items: center; justify-content: center; gap: 10px; border: 0 !important; border-radius: 12px !important; background: var(--ink) !important; color: #fff !important; font: 600 15px/1 Inter, sans-serif !important; box-shadow: none !important; padding: 0 16px !important; margin: 0 !important; float: none !important; text-transform: none !important; }
.pls-cart-slot .single_add_to_cart_button:hover { background: #333 !important; }
.pls-cart-slot .single_add_to_cart_button svg { width: 20px; height: 20px; flex: none; }

/* Medium screens: panel moves under the stage */
@media (max-width: 1100px) {
  .pls-body { flex-wrap: wrap; }
  .pls-stage { flex-basis: calc(100% - 92px); }
  .pls-panel { flex: 1 1 100%; border-left: 0; border-top: 1px solid var(--line); }
  .pls-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 380px); }
  .pls-summary { border-top: 0; border-left: 1px solid var(--line); }
}

/* Mobile (< 720px): rail becomes a horizontal bar, panel below the board */
@media (max-width: 719px) {
  .pls-studio { border-radius: 0; border-inline: 0; min-height: 0; }
  .pls-head { padding: 8px 12px; gap: 8px; }
  .pls-wordmark { font-size: 22px; }
  .pls-title { font-size: 16px; }
  .pls-head-tools .pls-divider { margin: 0 2px; }
  .pls-head > .pls-btn { min-height: 40px; padding: 0 10px; font-size: 13px; }
  .pls-body { flex-direction: column; }
  .pls-rail { width: 100%; flex-direction: row; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; padding: 6px 8px; }
  .pls-rail-btn { flex: 1 0 64px; height: 56px; }
  .pls-stage { flex: none; padding: 12px 12px 20px; }
  .pls-stage-meta span:last-child { display: none; }
  .pls-board-wrap { padding: 64px 0 40px; }
  .pls-toolbar { flex-wrap: wrap; justify-content: center; white-space: normal; row-gap: 4px; max-width: calc(100% - 16px); }
  .pls-tb-font select { max-width: 120px; }
  .pls-popover { position: fixed; left: 8px; right: 8px; top: auto; bottom: 8px; transform: none; width: auto; max-height: 60vh; }
  .pls-panel { display: flex; min-width: 0; flex: none; }
  .pls-summary { border-left: 0; border-top: 1px solid var(--line); }
}
.pls-run { display: inline-block; white-space: pre; }
.pls-hours-block > .pls-run { display: flex; }

/* Desktop: the studio fills one screen; only the panel scrolls. */
@media (min-width: 1101px) {
  .pls-studio { height: min(920px, calc(100vh - 110px)); min-height: 620px; }
  .pls-panel { min-height: 0; }
  .pls-panel-body { min-height: 0; }
}

/* Motion: short, functional, off for reduced motion. Board items never animate on re-render. */
.pls-studio { --pls-ease: cubic-bezier(.2, .7, .2, 1); }
.pls-toolbar:not([hidden]) { animation: pls-pop-up .16s var(--pls-ease) both; }
.pls-popover:not([hidden]) { animation: pls-pop .16s var(--pls-ease) both; transform-origin: top center; }
.pls-panel-body > section:not([hidden]) { animation: pls-fade-in .2s var(--pls-ease) both; }
.pls-swatch, .pls-rail-btn, .pls-tb-btn, .pls-icon-btn, .pls-ground, .pls-tile, .pls-icon-tile { transition: transform .12s var(--pls-ease), background-color .15s; }
.pls-swatch:active, .pls-tb-btn:active, .pls-icon-btn:active:not(:disabled), .pls-tile:active, .pls-icon-tile:active { transform: scale(.92); }
.pls-rail-btn:active { transform: scale(.96); }
.pls-item.is-selected .pls-dims { animation: pls-fade-in .18s var(--pls-ease) both; }
.pls-cart-slot .single_add_to_cart_button.is-added { background: #1f7a3f !important; }
.pls-fly { position: fixed; z-index: 9999; width: 34px; height: 34px; border-radius: 9px; background: #111; box-shadow: 0 6px 18px rgba(0,0,0,.25); pointer-events: none; }
@keyframes pls-pop-up { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pls-pop { from { opacity: 0; transform: translateX(-50%) scale(.96); } to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes pls-fade-in { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 719px) { @keyframes pls-pop { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } } }
@media (prefers-reduced-motion: reduce) {
  .pls-studio *, .pls-studio *::before, .pls-studio *::after { animation: none !important; transition: none !important; }
}
