/**
 * yoyaku-preorder — frontend styling.
 * YOYAKU design system: gold accent #f97316, IBM Plex Mono for emphasis.
 *
 * Loaded site-wide on yoyaku.io B2C and yydistribution.fr B2B.
 */

/* Single product page — availability card (v0.7.0 redesign) */
.yoyaku-preorder-availability {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 14px 0 20px;
  padding: 14px 16px;
  background: linear-gradient(180deg, #fff7ed 0%, #ffedd5 100%);
  border: 1px solid #fed7aa;
  border-left: 3px solid #f97316;
  border-radius: 4px;
  max-width: 420px;
  box-shadow: 0 1px 2px rgba(249, 115, 22, 0.08);
}

.yoyaku-preorder-availability__icon {
  color: #f97316;
  flex: 0 0 auto;
  margin-top: 2px;
}

.yoyaku-preorder-availability__copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.yoyaku-preorder-availability__tag {
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: #f97316;
  text-transform: uppercase;
  margin-bottom: 1px;
}

.yoyaku-preorder-availability__primary {
  font-family: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.yoyaku-preorder-availability__secondary {
  font-family: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 12px;
  color: #6b6256;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

@media (max-width: 480px) {
  .yoyaku-preorder-availability {
    max-width: 100%;
  }
  .yoyaku-preorder-availability__primary {
    font-size: 14px;
  }
}

/* Legacy single-line layout fallback (kept for theme overrides not aware
   of the v0.7.0 structure). */
p.yoyaku-preorder-availability {
  display: inline-block;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 13px;
}
p.yoyaku-preorder-availability .yoyaku-preorder-icon {
  color: #f97316;
  font-size: 9px;
  margin-right: 6px;
  vertical-align: middle;
  animation: yoyaku-preorder-pulse 2s ease-in-out infinite;
}

@keyframes yoyaku-preorder-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

/* Archive / category / shop loop badge — REMOVED 2026-05-08 v0.7.5.
   YIO Product Badges (yio/modules/product-badges/) is the SSOT for
   grid badges. The .yoyaku-preorder-* classes here are PDP-only. */

/* Cart + checkout — per-item native meta line "Ship date: …" rendered by
   wc_get_formatted_cart_item_data. WC outputs each entry in <dl class="variation"> /
   <p class="wc-item-meta-label"> structure depending on theme. We accent the
   value with a calendar-tone color so the date stands out without overriding
   theme typography. */
.woocommerce-checkout-review-order-table .wc-item-meta li,
.woocommerce-cart-form .product-name .wc-item-meta li,
.woocommerce-cart-form .product-name dl.variation dd {
  color: #6b6256;
  font-size: 12px;
}
.woocommerce-checkout-review-order-table .wc-item-meta li strong,
.woocommerce-cart-form .product-name .wc-item-meta li strong {
  color: #f97316;
  font-weight: 600;
}

/* Defensive fallback line embedded in cart_item_name (themes that bypass
   meta rendering). Hidden by default — only shown when meta line absent. */
.yoyaku-preorder-cart-fallback {
  display: inline;
}
.wc-item-meta + * .yoyaku-preorder-cart-fallback,
.wc-item-meta ~ .yoyaku-preorder-cart-fallback,
.product-name dl.variation ~ .yoyaku-preorder-cart-fallback {
  display: none;
}
.yoyaku-preorder-cart-note {
  display: block;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  font-size: 11px;
  color: #888;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

/* Checkout review-order notice */
.yoyaku-preorder-checkout-notice {
  font-family: 'Schibsted Grotesk', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #1a1a1a;
  margin: 16px 0;
  padding: 12px 14px;
  background: #faf8f3;
  border: 1px solid #e6dfd0;
  border-radius: 4px;
}

/* My-account orders list — preorder status badge augmentation */
.order-status.status-pre-ordered,
.order-status.status-shelf {
  background: #f97316 !important;
  color: #1a1a1a !important;
  font-family: 'IBM Plex Mono', Consolas, monospace;
  letter-spacing: 0.04em;
}
