/* KCG quote list UI. Colours/spacing come from the active theme's presets (KCG theme); plain fallbacks are
   intentionally NOT added so a missing preset is visible during development instead of silently off-brand. */
.kcg-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; margin-left: var(--wp--preset--spacing--10); border-radius: var(--wp--preset--border-radius--pill); background: var(--wp--preset--color--amber); color: var(--wp--preset--color--on-amber); font-size: 11px; font-weight: 700; line-height: 1; }
.kcg-badge[hidden] { display: none; }
.kcg-badge.is-bump { animation: kcg-bump .35s var(--wp--custom--ease); }
@keyframes kcg-bump { 50% { transform: scale(1.35); } }

.kcg-add { display: inline-flex; align-items: center; justify-content: center; gap: var(--wp--preset--spacing--20); width: 100%; min-height: var(--wp--custom--control-height-sm); padding: 0 var(--wp--preset--spacing--30); border: 1px solid var(--wp--preset--color--brand-line); border-radius: var(--wp--preset--border-radius--small); background: var(--wp--preset--color--surface); color: var(--wp--preset--color--brand-ink); font-family: inherit; font-weight: 600; font-size: var(--wp--preset--font-size--small); line-height: 1; cursor: pointer; transition: border-color .2s, color .2s; }
.kcg-add:hover { border-color: var(--wp--preset--color--brand); }
.kcg-add.is-in { color: var(--wp--preset--color--ok); border-color: var(--wp--preset--color--ok); }
.kcg-add svg { width: 18px; height: 18px; fill: currentColor; }
.kcg-add .kcg-add__ic--on, .kcg-add.is-in .kcg-add__ic--off { display: none; }
.kcg-add.is-in .kcg-add__ic--on { display: inline; }
/* narrow product cards on the smallest phones: the label alone, on one line, centred.
   The icon wrapper spans are hidden (not only their svg), so no empty flex item and gap push the label aside. */
.kcg-add { white-space: nowrap; }
@media (max-width: 380px) { .kcg-add:not(.kcg-add--primary) > span:not(.kcg-add__label) { display: none; } }
.kcg-add--primary { width: auto; min-height: var(--wp--custom--control-height); background: var(--wp--preset--color--brand); border-color: var(--wp--preset--color--brand); color: var(--wp--preset--color--on-brand); padding: 0 var(--wp--preset--spacing--60); }
.kcg-add--primary:hover { background: var(--wp--preset--color--brand-deep); }
.kcg-add--primary.is-in { background: var(--wp--preset--color--surface); }

.kcg-veil { position: fixed; inset: 0; z-index: var(--wp--custom--z--drawer); background: rgb(15 31 55 / .6); opacity: 0; transition: opacity .25s; }
.kcg-drawer { position: fixed; top: var(--kcg-adminbar-h); right: 0; /* below the admin bar of logged-in users (theme.css) */ bottom: 0; z-index: calc(var(--wp--custom--z--drawer) + 1); width: min(420px, 100%); display: flex; flex-direction: column; background: var(--wp--preset--color--surface); transform: translateX(100%); transition: transform .35s var(--wp--custom--ease); }
.kcg-drawer-open .kcg-veil { opacity: 1; }
.kcg-drawer-open .kcg-drawer { transform: none; }
.kcg-drawer__head { display: flex; justify-content: space-between; align-items: center; padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); border-bottom: 1px solid var(--wp--preset--color--line); }
.kcg-drawer__head h2 { margin: 0; font-size: var(--wp--preset--font-size--large); }
.kcg-drawer__x { width: var(--wp--custom--control-height); height: var(--wp--custom--control-height); border: 0; border-radius: 50%; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--wp--preset--color--ink); }
.kcg-drawer__x:hover { background: var(--wp--preset--color--paper); }
.kcg-drawer__list { flex: 1; overflow: auto; padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50); display: grid; align-content: start; gap: var(--wp--preset--spacing--30); }
.kcg-qi { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: var(--wp--preset--spacing--30); align-items: center; padding-bottom: var(--wp--preset--spacing--30); border-bottom: 1px solid var(--wp--preset--color--line); font-size: var(--wp--preset--font-size--small); }
.kcg-qi img { width: 64px; height: 64px; object-fit: contain; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--preset--border-radius--small); }
.kcg-qi a { color: var(--wp--preset--color--ink); font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kcg-qi small { display: block; color: var(--wp--preset--color--ink-2); }
.kcg-qi__rm { border: 0; background: none; padding: var(--wp--preset--spacing--10) 0; color: var(--wp--preset--color--ink-2); font-size: var(--wp--preset--font-size--x-small); cursor: pointer; text-decoration: underline; }
.kcg-step { display: inline-flex; align-items: center; border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--preset--border-radius--pill); }
.kcg-step button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; cursor: pointer; font-size: 18px; color: var(--wp--preset--color--ink); }
.kcg-step span { min-width: 22px; text-align: center; font-weight: 600; }
.kcg-empty { color: var(--wp--preset--color--ink-2); text-align: center; padding: var(--wp--preset--spacing--80) var(--wp--preset--spacing--40); }
.kcg-drawer__form { display: grid; gap: var(--wp--preset--spacing--30); padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); border-top: 1px solid var(--wp--preset--color--line); background: var(--wp--preset--color--paper); }
.kcg-drawer__intro { margin: 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--ink-2); }
.kcg-drawer__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wp--preset--spacing--30); }
.kcg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kcg-toast { position: fixed; left: 50%; bottom: var(--wp--preset--spacing--60); transform: translateX(-50%); width: max-content; max-width: calc(100vw - 2 * var(--wp--preset--spacing--40)); box-sizing: border-box; /* left:50% alone would cap it at half the screen */ z-index: var(--wp--custom--z--toast); padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--40); border-radius: var(--wp--preset--border-radius--medium); background: var(--wp--preset--color--deep); color: var(--wp--preset--color--on-deep); font-size: var(--wp--preset--font-size--small); box-shadow: var(--wp--preset--shadow--float); }
@media (max-width: 480px) { .kcg-drawer__row { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .kcg-drawer, .kcg-veil { transition: none; } }

/* product page: size choice + quantity (kcg/add-to-quote with options). Inside a flex row (the theme's buy row) the
   block's own box disappears, so sizes take a full line and stepper + button line up with sibling buttons. */
.kcg-atq--options { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wp--preset--spacing--30); }
.is-layout-flex > .kcg-atq--options { display: contents; }
.kcg-opts { display: grid; gap: var(--wp--preset--spacing--20); flex-basis: 100%; }
.kcg-opts__l { font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.kcg-opts__one { font-weight: 400; color: var(--wp--preset--color--ink-2); }
.kcg-opts__list { display: flex; flex-wrap: wrap; gap: var(--wp--preset--spacing--20); }
.kcg-opts__list button { min-height: var(--wp--custom--control-height); padding: 0 var(--wp--preset--spacing--40); border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--preset--border-radius--small); background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); font-family: inherit; font-weight: 500; font-size: var(--wp--preset--font-size--small); line-height: 1; cursor: pointer; }
.kcg-opts__list button:hover { border-color: var(--wp--preset--color--brand-line); }
.kcg-opts__list button[aria-checked="true"] { border-color: var(--wp--preset--color--brand); background: var(--wp--preset--color--brand-soft); color: var(--wp--preset--color--brand-ink); font-weight: 600; }
/* the whole stepper, border included, is one control height, like the buttons next to it */
.kcg-step--lg { box-sizing: border-box; height: var(--wp--custom--control-height); border-radius: var(--wp--preset--border-radius--small); background: var(--wp--preset--color--surface); }
.kcg-step--lg button { width: var(--wp--custom--control-height); height: 100%; border-radius: var(--wp--preset--border-radius--small); }
.kcg-step--lg button:hover { background: var(--wp--preset--color--paper); }
.kcg-atq--options .kcg-add--primary { flex: 1 1 auto; }
@media (max-width: 640px) { .kcg-atq--options .kcg-add--primary { flex-basis: 100%; } }

/* Request forms: the drawer form and the contact form (kcg/contact-form) share one field style (design C).
   This file is also the contact form block style, so the editor preview looks the same. */
.kcg-form label { display: grid; gap: var(--wp--preset--spacing--10); font-size: var(--wp--preset--font-size--small); font-weight: 600; }
.kcg-form :is(input, select, textarea) { width: 100%; min-height: var(--wp--custom--control-height); box-sizing: border-box; margin: 0; padding: var(--wp--preset--spacing--20) var(--wp--preset--spacing--30); border: 1px solid var(--wp--preset--color--line); border-radius: var(--wp--preset--border-radius--small); background: var(--wp--preset--color--surface); color: var(--wp--preset--color--ink); font-family: inherit; font-size: var(--wp--preset--font-size--medium); font-weight: 400; line-height: 1.4; }
.kcg-form textarea { resize: vertical; }
.kcg-form [hidden] { display: none !important; } /* a field asked only while the quote list is empty (labels are display: grid) */
.kcg-form ::placeholder { color: var(--wp--preset--color--ink-2); }
.kcg-form :is(input, select, textarea):focus { outline: 2px solid var(--wp--preset--color--brand); outline-offset: 0; border-color: transparent; }
.kcg-form [aria-invalid="true"] { border: 2px solid var(--wp--preset--color--brand-ink); }
.kcg-form button[type=submit] { display: inline-flex; align-items: center; justify-content: center; gap: var(--wp--preset--spacing--20); min-height: var(--wp--custom--control-height); border: 0; cursor: pointer; }
.kcg-form button[type=submit] svg { width: 18px; height: 18px; fill: currentColor; } /* ds-ok: icon size */
.kcg-form [data-kcg-msg] { margin: 0; min-height: 1.4em; /* ds-ok: one text line kept free so the form does not jump when a message appears */ font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--ink-2); }
/* topic list: own chevron instead of the browser arrow */
.kcg-select { position: relative; display: block; }
.kcg-select select { appearance: none; padding-right: var(--wp--preset--spacing--70); cursor: pointer; }
.kcg-select svg { position: absolute; top: 50%; right: var(--wp--preset--spacing--30); width: 16px; height: 16px; transform: translateY(-50%); fill: currentColor; color: var(--wp--preset--color--ink-2); pointer-events: none; } /* ds-ok: icon size */

/* drawer form: smaller text than the contact form (after the shared rules, which it overrides) */
.kcg-drawer__form label { font-size: var(--wp--preset--font-size--x-small); }
.kcg-drawer__form :is(input, select, textarea) { font-size: var(--wp--preset--font-size--small); }
.kcg-drawer__form button[type=submit] { width: 100%; }
.kcg-drawer__form [data-kcg-msg] { min-height: 1.2em; font-size: var(--wp--preset--font-size--x-small); }

/* contact form: two columns (name | phone, email | topic), message + status line full width, button in column 1 */
.wp-block-kcg-contact-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wp--preset--spacing--40); }
.wp-block-kcg-contact-form > .kcg-form__full, .wp-block-kcg-contact-form > [data-kcg-msg] { grid-column: 1 / -1; }
@media (max-width: 640px) { .wp-block-kcg-contact-form { grid-template-columns: minmax(0, 1fr); } }
/* the quote-list form is the same block (template part "quote-form"): drawer spacing, intro and button full width */
.wp-block-kcg-contact-form.kcg-drawer__form { gap: var(--wp--preset--spacing--30); }
.kcg-drawer__form > :is(.kcg-drawer__intro, button[type=submit]) { grid-column: 1 / -1; }
/* tick box field: box and text on one line */
.kcg-form .kcg-form__check { display: flex; align-items: center; gap: var(--wp--preset--spacing--20); font-weight: 400; }
.kcg-form .kcg-form__check input { width: auto; min-height: 0; margin: 0; }
