html {
  background: var(--color-bg);
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: var(--leading-body);
  /* Lining figures everywhere: Cormorant defaults to old-style digits
     (« 1 » reads like « I », « 5 » drops below the line). */
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font-variant-numeric: inherit;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-accent-text);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

::selection {
  background: var(--color-brand);
  color: var(--color-white);
}

.thiek-sr,
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.thiek-skip {
  position: absolute;
  top: 0;
  left: var(--spacing-sm);
  z-index: 100;
  padding: var(--spacing-xs) var(--spacing-sm);
  background: var(--color-surface);
  color: var(--color-text);
  transform: translateY(-120%);
}

.thiek-skip:focus {
  transform: none;
}

/* WooCommerce blockUI paints an inline white veil. Keep it on the page colour. */
.blockUI.blockOverlay {
  background: transparent !important;
  opacity: 1 !important;
  cursor: wait !important;
}

.blockUI.blockOverlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--color-bg);
  opacity: 0.55;
  animation: thiek-block-fade 150ms ease;
  pointer-events: none;
}

.woocommerce .blockUI.blockOverlay::before,
.blockUI.blockOverlay::before {
  content: "" !important;
  z-index: 1;
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px !important;
  border: 2px solid color-mix(in srgb, var(--color-text) 28%, transparent);
  border-top-color: var(--color-brand);
  border-radius: var(--radius-full);
  background: none !important;
  background-image: none !important;
  font-size: 0;
  color: var(--color-text);
  animation: thiek-block-spin 0.7s linear infinite;
}

@keyframes thiek-block-fade {
  from { opacity: 0; }
  to { opacity: 0.55; }
}

@keyframes thiek-block-spin {
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .blockUI.blockOverlay::after,
  .blockUI.blockOverlay::before {
    animation: none;
  }

  .blockUI.blockOverlay::after {
    opacity: 0.55;
  }
}
