/*
 * Component CSS for the markup tte-core renders (announcement bar, product
 * trust strip, fulfilment cue, "Order on WhatsApp" button).
 *
 * This lives in the mu-plugin, not a theme, on purpose: tte-core renders this
 * markup regardless of which theme is active, so it must carry its own styling.
 * These rules were extracted from the retired Blocksy child theme's brand.css.
 */

:root {
  --tte-r-pill: 999px;
  --tte-r-input: 12px;
  --tte-focus: 0 0 0 3px rgba(122, 79, 176, .45);
  --tte-ease: cubic-bezier(.34, 1.56, .64, 1);
  --tte-dur: 160ms;
  /* Literal copies of the brand tokens (formerly theme.json presets), so this
     file does not depend on the active theme. */
  --tte-color-plum: #4F2D59;
  --tte-color-lavender: #E0D5E3;
  --tte-color-surface: #FFFFFF;
  --tte-color-lilac: #CDB6D4;
  --tte-color-orchid: #A36BB4;
  --tte-color-mint: #2FA98C;
  --tte-color-grape: #794588;
  --tte-color-rose: #EC6F9C;
  --tte-color-muted: #6B6474;
  --tte-color-ink: #2C2733;
  --tte-font-display: Quicksand, system-ui, sans-serif;
  --tte-font-body: inherit;
  --tte-space-20: 8px;
  --tte-space-30: 16px;
  --tte-space-40: 24px;
}

/* Announcement bar (tte-core/inc/announcement.php, echoed on wp_body_open —
   sits above the sticky header on every front-end page). */
.tte-announcement {
  background: var(--tte-color-plum);
  color: var(--tte-color-lavender);
  font-family: var(--tte-font-body);
  font-weight: 600;
  font-size: 0.85rem;
  text-align: center;
  padding: 9px var(--tte-space-40);
}

.tte-announcement a {
  color: var(--tte-color-surface);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tte-announcement a:hover,
.tte-announcement a:focus-visible {
  color: var(--tte-color-surface);
  text-decoration-thickness: 2px;
}

/* Inline SVG icon helper base (tte_icon()) — size overridden per-use. */
.tte-icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -.125em;
}

/* Reusable brand button classes — tte-core only renders the ghost variant
   (the "Order on WhatsApp" button), so tte-btn-primary/-secondary/-link are
   intentionally not carried over here. */
.tte-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--tte-font-display);
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1;
  min-height: 44px;
  padding: 0.85rem 1.6rem;
  border-radius: var(--tte-r-pill);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--tte-dur) var(--tte-ease), box-shadow var(--tte-dur) var(--tte-ease),
    background-color var(--tte-dur) var(--tte-ease);
}

.tte-btn-ghost {
  background: var(--tte-color-surface);
  color: var(--tte-color-ink);
  border-color: var(--tte-color-lilac);
}
.tte-btn-ghost:hover {
  border-color: var(--tte-color-orchid);
  color: var(--tte-color-orchid);
}

.tte-btn:focus-visible,
.tte-btn-ghost:focus-visible {
  outline: none;
  box-shadow: var(--tte-focus);
}

/* brand.css's reduced-motion off-switch (§10) bundled .tte-btn together with
   .tte-btn-primary/.tte-card/.tte-hero-card/theme + WooCommerce button
   selectors that belong to the deleted block patterns or the theme. Carried
   over only the .tte-btn selector, since it's the only one tte-core owns. */
@media (prefers-reduced-motion: reduce) {
  .tte-btn {
    transition: none !important;
    transform: none !important;
  }
}

/* Fulfillment cue — kit=mint, recorded=grape, live=rose. Always icon +
   >=.83rem bold, per tokens.css's contrast rule for small colored text. */
.tte-fulfil {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 8px 8px 2px;
  font-family: var(--tte-font-display);
  font-weight: 700;
  font-size: 0.83rem;
}

.tte-fulfil .tte-icon {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.tte-fulfil.is-kit {
  color: var(--tte-color-mint);
}

.tte-fulfil.is-recorded {
  color: var(--tte-color-grape);
}

.tte-fulfil.is-live {
  color: var(--tte-color-rose);
}

/* Trust strip — a reusable row of trust markers (COD · delivery · WhatsApp ·
   certificate) rendered under the add-to-cart form on the single product
   page (tte-core/inc/product-page.php). */
.tte-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tte-space-30);
  margin-top: var(--tte-space-40);
  padding-top: var(--tte-space-30);
  border-top: 1px solid var(--tte-color-lilac);
}

.tte-trust-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--tte-font-body);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--tte-color-muted);
}

.tte-trust-item.is-mint {
  color: var(--tte-color-mint);
}

.tte-trust-item .tte-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.tte-trust-item.is-orchid {
  color: var(--tte-color-orchid);
}

.tte-trust-label {
  color: var(--tte-color-muted);
}

@media (max-width: 767.98px) {
  .tte-trust-strip {
    gap: var(--tte-space-20);
  }
}

/* Boxed variant of the trust strip on the single product page specifically
   (WooCommerce's own `.woocommerce div.product` wrapper — core markup, not
   theme-specific). The plain flex row above is the default look elsewhere. */
.woocommerce div.product .tte-trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  border: 1px solid var(--tte-color-lilac);
  border-radius: var(--tte-r-input);
  background: var(--tte-color-surface);
  padding: 18px;
  margin-top: var(--tte-space-30);
}

.woocommerce div.product .tte-trust-item {
  font-size: 0.88rem;
  color: var(--tte-color-ink);
}

/* "Order on WhatsApp" — an extra ghost pill beside Add to cart
   (inc/product-page.php, `woocommerce_after_add_to_cart_button`). Mint
   chat icon; hover swaps the border/icon to mint (not the shared ghost
   button's default orchid hover) per the design. */
.tte-order-whatsapp .tte-icon {
  color: var(--tte-color-mint);
}

.tte-order-whatsapp:hover {
  border-color: var(--tte-color-mint) !important;
  color: var(--tte-color-mint) !important;
}
