/*
 * Global tokens and the site's registers (fields, buttons, controls, popups,
 * focus). Loaded first in the theme chain. See docs/design-system.md.
 */

:root {
  --ck-edge-col: var(--ck-line);
  --ck-edge: 1px solid var(--ck-edge-col);
}

:root {
  --ck-label-safe-l: max(24px, env(safe-area-inset-left));
  --ck-label-safe-r: max(24px, env(safe-area-inset-right));
}

:root {
  --ck-commerce-text: var(--ck-ink);
  --ck-commerce-surface: var(--ck-surface);
}

:root {
  text-underline-offset: 3px;
}

:root {
  --ck-field-fs: 12px;
  --ck-field-h: 44px;
  --ck-field-bg: var(--ck-white);
  --ck-field-border: var(--ck-line-strong);
  --ck-field-pad-x: 12px;
  --ck-field-label-fs: 10px;
  --ck-field-label-col: var(--ck-muted);
  --ck-field-caret: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23000' stroke-width='1.2'/%3E%3C/svg%3E");
}

@media (max-width: 767px) {
  :root {
    --ck-field-fs: 16px;
  }
}

/* The register of what is a form field; add a surface here rather than restyling it. */
.bk-pro input[type="text"],
.bk-pro input[type="email"],
.bk-pro input[type="tel"],
.bk-pro textarea,
#contact-popup input[type="text"],
#contact-popup input[type="email"],
#contact-popup input[type="tel"],
#contact-popup textarea,
#bk-bespoke input.bk-bespoke-note,
.bk-market__field select,
input.ck-filter-search__input,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea.input-text {
  box-sizing: border-box;
  width: 100%;
  height: var(--ck-field-h);
  margin: 0;
  padding: 0 var(--ck-field-pad-x);
  background: var(--ck-field-bg);
  border: 1px solid var(--ck-field-border);
  border-radius: 0;
  outline: none;
  font-family: inherit;
  font-size: var(--ck-field-fs);
  letter-spacing: 0;
  text-transform: none;
  color: var(--ck-ink);
}

.bk-pro textarea,
#contact-popup textarea {
  height: 96px;
  padding: 12px var(--ck-field-pad-x);
  resize: none;
}

.bk-pro input:not([type="checkbox"]):not([type="radio"]):focus,
.bk-pro textarea:focus,
#contact-popup input:not([type="checkbox"]):not([type="radio"]):focus,
#contact-popup textarea:focus,
.bk-market__field select:focus,
input.ck-filter-search__input:focus,
#bk-bespoke input.bk-bespoke-note:focus,
.woocommerce form .form-row input.input-text:focus {
  border-color: var(--ck-ink);
}

.bk-pro ::placeholder,
#contact-popup ::placeholder,
input.ck-filter-search__input::placeholder {
  color: var(--ck-placeholder);
}

.bk-pro__field label,
#contact-popup .bk-field label,
.bk-market__field > span {
  display: block;
  margin-bottom: 4px;
  font-size: var(--ck-field-label-fs);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ck-field-label-col);
  opacity: 1;
}

.bk-market__field select,
.woocommerce select.country_select,
.woocommerce select.state_select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 32px;
  background-image: var(--ck-field-caret);
  background-repeat: no-repeat;
  background-position: right 12px center;
}

html {
  background-color: var(--ck-surface);
}
html:has(body.home) {
  background-color: var(--ck-black);
}

html[data-ck-focus='escape'] *:focus,
html[data-ck-focus='escape'] *:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

* {
  -webkit-tap-highlight-color: transparent;
}

:root {
  --ck-btn-h: 44px;
  --ck-btn-min-w: 150px;

  /* Colours, not alphas: write background: var(--ck-btn-hover), never rgba(0,0,0,var(...)). */

  --ck-btn: var(--ck-ink);
  --ck-btn-hover: var(--ck-btn-mid);
  --ck-btn-active: var(--ck-btn-mid);

  --ck-btn-veil: var(--ck-scrim);
  --ck-btn-veil-hover: var(--ck-btn-mid);
}

button.bk-market__save.bk-market__save,
button.bk-pro__submit.bk-pro__submit,
.bk-bespoke-modal .bk-bespoke-modal-actions button,
a.checkout-button.checkout-button {
  box-sizing: border-box;
  min-height: var(--ck-btn-h);
  padding: 0 24px;
  background: var(--ck-btn);
  color: var(--ck-white);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease;
}

button.bk-market__save.bk-market__save:hover,
button.bk-pro__submit.bk-pro__submit:hover,
.bk-bespoke-modal .bk-bespoke-modal-actions button:hover,
a.checkout-button.checkout-button:hover {
  background: var(--ck-btn-hover);
  color: var(--ck-white);
}

button.bk-market__save.bk-market__save:active,
button.bk-pro__submit.bk-pro__submit:active,
.bk-bespoke-modal .bk-bespoke-modal-actions button:active,
a.checkout-button.checkout-button:active {
  background: var(--ck-btn-active);
  color: var(--ck-white);
}

button.bk-market__save.bk-market__save:disabled,
button.bk-pro__submit.bk-pro__submit:disabled,
.bk-bespoke-modal .bk-bespoke-modal-actions button:disabled,
a.checkout-button.checkout-button.is-disabled,
a.checkout-button.checkout-button[aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
  cursor: default;
}

.bk-bespoke-modal .bk-bespoke-modal-actions button#bk-bespoke-cancel {
  background: var(--ck-btn-veil);
  color: var(--ck-white);
  border: 0;
  text-decoration: none;
  opacity: 1;
}

.bk-bespoke-modal .bk-bespoke-modal-actions button#bk-bespoke-cancel:hover,
.bk-bespoke-modal .bk-bespoke-modal-actions button#bk-bespoke-cancel:active {
  background: var(--ck-btn-veil-hover);
  color: var(--ck-white);
}

.single-product button.single_add_to_cart_button:hover,
.woocommerce div.product form.cart button.single_add_to_cart_button:hover {
  background-color: var(--ck-btn-hover);
  color: var(--ck-white);
}

.single-product button.single_add_to_cart_button:active,
.woocommerce div.product form.cart button.single_add_to_cart_button:active {
  background-color: var(--ck-btn-active);
  color: var(--ck-white);
}

/* Only containers that cannot be tabbed to; never a real control. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible,
body:focus,
body:focus-visible,
.ck-viewer:focus,
.ck-viewer:focus-visible {
  outline: none;
}

/* A full-viewport <dialog> that paints its own scrim; the panel inside is the box. Zero specificity, so a component restyles it. See docs/keyboard.md (The popups). */
:where(dialog.ck-modal) {
  position: fixed;
  inset: 0;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  border: 0;
  padding: 0;
  overflow: auto;
  background: var(--ck-scrim);
  color: var(--ck-ink);
}

:where(dialog.ck-modal[open]) {
  display: flex;
  align-items: center;
  justify-content: center;
}

:where(dialog.ck-modal)::backdrop {
  background: transparent;
}

:root {
  --ck-popup-surface: var(--ck-surface);
}

/* A checkbox beside its label is centred on the label's first line (contact-popup.css, bag.css). The line is measured on
   the label, not the box: registered, 1lh resolves there and the box inherits a length. Read on the box itself it was the
   box's own line, and on a phone, where inputs are 16px so iOS does not zoom, that put the box 5px low. */
@property --bk-check-line {
  syntax: "<length>";
  inherits: true;
  initial-value: 16px;
}

.woocommerce-cart :is(input[type="checkbox"], input[type="radio"]),
.woocommerce-checkout :is(input[type="checkbox"], input[type="radio"]),
#contact-popup :is(input[type="checkbox"], input[type="radio"]),
.bk-bespoke-modal :is(input[type="checkbox"], input[type="radio"]) {
  appearance: none;
  -webkit-appearance: none;
  box-sizing: border-box;
  flex: 0 0 auto;
  /* inline-block: WooCommerce sets display:inline, and an inline box ignores width. */
  display: inline-block !important;
  width: 16px !important;
  height: 16px !important;
  margin: 0;
  padding: 0;
  background: var(--ck-white);
  border: 1px solid var(--ck-field-border);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.woocommerce-cart input[type="radio"],
.woocommerce-checkout input[type="radio"],
#contact-popup input[type="radio"],
.bk-bespoke-modal input[type="radio"] {
  border-radius: 50%;
}

.woocommerce-cart input[type="checkbox"]:checked,
.woocommerce-checkout input[type="checkbox"]:checked,
#contact-popup input[type="checkbox"]:checked,
.bk-bespoke-modal input[type="checkbox"]:checked {
  background: var(--ck-ink);
  border-color: var(--ck-ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='square'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
}

.woocommerce-cart input[type="radio"]:checked,
.woocommerce-checkout input[type="radio"]:checked,
#contact-popup input[type="radio"]:checked,
.bk-bespoke-modal input[type="radio"]:checked {
  border-color: var(--ck-ink);
  background-image: radial-gradient(circle, var(--ck-ink) 0 45%, transparent 47%);
}

.bk-pro__intent,
#contact-popup .bk-intent {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.bk-pro__intent label,
#contact-popup .bk-intent label {
  position: relative;
  display: block;
  margin: 0;
  cursor: pointer;
  color: var(--ck-ink);
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.bk-pro__intent input[type="radio"],
#contact-popup .bk-intent input[type="radio"] {
  position: absolute;
  /* !important to answer the control register's own !important size. */
  width: 1px !important;
  height: 1px !important;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
  appearance: none;
}

.bk-pro__intent label:has(input[type="radio"]:checked),
#contact-popup .bk-intent label:has(input[type="radio"]:checked) {
  text-decoration: underline;
}

@media (hover: hover) {
  .bk-pro__intent label:hover,
  #contact-popup .bk-intent label:hover {
    text-decoration: underline;
  }
}

.bk-pro__intent,
#contact-popup .bk-intent {
  padding-top: 2px;
  padding-bottom: 3px;
}

.bk-pro__intent:has(input[type="radio"]:focus-visible),
#contact-popup .bk-intent:has(input[type="radio"]:focus-visible) {
  outline: 1px solid var(--ck-ink);
  outline-offset: 2px;
}

:focus-visible {
  outline: 1px solid var(--ck-ink);
  outline-offset: 2px;
}

#contact-popup .bk-close,
.cmplz-cookiebanner .cmplz-close {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.cmplz-cookiebanner .cmplz-close {
  font-size: 15px;
  line-height: 1;
  color: var(--ck-ink);
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
}

.dialog-close-button.dialog-close-button {
  border-radius: 0;
}

.ck-skip.ck-skip {
  position: fixed;
  left: 50%;
  top: 8px;
  z-index: 2147483001;
  transform: translateX(-50%);
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none;
  background: var(--ck-btn);
  color: var(--ck-white);
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

.ck-skip.ck-skip:focus {
  top: calc(var(--ckh-h, 48px) + 8px);
  width: auto;
  height: auto;
  padding: 12px 24px;
  overflow: visible;
  clip-path: none;
  opacity: 1;
  pointer-events: auto;
  outline: 1px solid var(--ck-white);
  outline-offset: -3px;
}

.bk-field-error {
  display: block;
  margin-top: 4px;
  color: var(--ck-err);
  font-size: 10px;
  line-height: 1.5;
}

.bk-form-alert {
  margin: var(--ck-pd-tight, 8px) 0 0;
  color: var(--ck-err);
  font-size: 10px;
  line-height: 1.5;
}

.bk-form-alert:empty {
  margin: 0;
}

@media (hover: none) {
  /* Mirrors the button register's :hover list; add new controls to both. */
  button.bk-market__save.bk-market__save:hover,
  button.bk-market__save.bk-market__save:active,
  button.bk-pro__submit.bk-pro__submit:hover,
  button.bk-pro__submit.bk-pro__submit:active,
  .bk-bespoke-modal .bk-bespoke-modal-actions button:hover,
  .bk-bespoke-modal .bk-bespoke-modal-actions button:active,
  a.checkout-button.checkout-button:hover,
  a.checkout-button.checkout-button:active,
  .single-product button.single_add_to_cart_button:hover,
  .single-product button.single_add_to_cart_button:active,
  .woocommerce div.product form.cart button.single_add_to_cart_button:hover,
  .woocommerce div.product form.cart button.single_add_to_cart_button:active {
    background: var(--ck-btn) !important;
  }

  .bk-bespoke-modal .bk-bespoke-modal-actions button#bk-bespoke-cancel:hover,
  .bk-bespoke-modal .bk-bespoke-modal-actions button#bk-bespoke-cancel:active {
    background: var(--ck-btn-veil);
  }
}

:root {
  --ck-cursor-zoom: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32' fill='none' stroke-linecap='square'%3E%3Cpath d='M6 12V6h6M20 6h6v6M26 20v6h-6M12 26H6v-6M16 11v10M11 16h10' stroke='%23111' stroke-width='2'/%3E%3C/svg%3E") 16 16, zoom-in;
}

/* From the former Customizer CSS. */

input[type="radio"] {
    accent-color: var(--ck-ink); 
}

.outofstock p.price ins {
    text-decoration: none !important;
    opacity: .6 !important; 
    text-decoration: line-through !important;
}

.outofstock p.price del {
     text-decoration: none !important;
    opacity: .6 !important; 
    text-decoration: line-through !important;
}

/* 16px floor on focusable fields: below it iOS Safari zooms the page on focus. */
@media (max-width: 767px) {
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="url"],
  input[type="number"],
  input[type="search"],
  input[type="password"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
  }
}

/* The quantity stepper (inc/woocommerce/quantity.php). */

.quantity input::-webkit-outer-spin-button,
.quantity input::-webkit-inner-spin-button {
    -webkit-appearance: none; margin: 0;
}
.quantity input[type=number] { -moz-appearance: textfield; }

.quantity {
    display: inline-flex;
    align-items: center;
    border-bottom: 1.5px solid var(--ck-ink);
    background: transparent;
}

.quantity .minus,
.quantity .plus {
    background: none;
    border: none;
    padding: 5px 12px;
    cursor: pointer;
    font-size: 20px;
    font-weight: 300;
    color: var(--ck-ink);
    outline: none;
}

.quantity .qty {
    width: 40px;
    height: 35px;
    text-align: center;
    border: none !important;
    background: transparent !important;
    font-size: 14px;
    font-weight: 500;
    outline: none;
}

