/*
 * irobot-th-2026 — woo-lite.css
 * ------------------------------------------------------------
 * ของที่ PDP / PLP ยังต้องใช้หลังตัด woocommerce-general / -layout / -smallscreen (PERF-AUDIT T-06 · 11.10.2026)
 * โหลดเฉพาะ PDP + PLP และเฉพาะตอนที่ CSS ของ Woo ถูกตัดจริง (inc/enqueue.php › irb_woo_styles_dequeued())
 *
 * ที่มา: เทียบ computed style ทุก element ของหน้า staging 10 แบบ × 375/1280 px ตอนเปิด/ปิด CSS ของ Woo (11.10.2026)
 *   - ดาวคะแนน (.star-rating) พังเป็นข้อความ "5.00 จากคะแนนเต็ม 5" → ยกโครงจาก woocommerce.css 10.6.2 มา (§1)
 *   - ข้อความแจ้งเตือนของ Woo (หยิบใส่ตะกร้าแล้ว / ผิดพลาด) กลายเป็นตัวหนังสือเปล่า → ใช้หน้าตาเดียวกับหน้าบัญชี (§2 · account.css)
 *   - การ์ดรีวิว (.review-card ใน design-system.css) เดิมถูก CSS ของ Woo ทับจนไม่มีพื้น sand/ระยะขอบ → ตัด Woo แล้วกลับมาตามดีไซน์ (ไม่ต้องทำอะไร)
 *   - ที่เหลือ (ช่องเรียงลำดับสูงขึ้น 4px · ระยะใต้แถวสินค้าแนะนำ −16px) ดูด้วยตาไม่ต่าง
 *
 * 🔴 สีใช้ token เท่านั้น (กฎ assets/css) · ฟอนต์ไอคอน WooCommerce ต้องมี @font-face ที่ชี้ไฟล์ในปลั๊กอิน →
 *    PHP พิมพ์ให้ (wp_add_inline_style · URL จาก WC()->plugin_url()) ไฟล์นี้จึงไม่มี @font-face
 */

/* ---------- §1 ดาวคะแนน — โครงเดียวกับ woocommerce.css 10.6.2 (สีดาวว่างจาก token แทนสีเทาม่วงของ Woo) ---------- */
.woocommerce .star-rating {
  float: right; overflow: hidden; position: relative;
  height: 1em; line-height: 1; font-size: 1em; width: 5.4em;
  font-family: WooCommerce;
}
.woocommerce .star-rating::before {
  content: "sssss"; color: rgba(var(--brand-color-border-rgb), .6);
  float: left; top: 0; left: 0; position: absolute;
}
.woocommerce .star-rating span { overflow: hidden; float: left; top: 0; left: 0; position: absolute; padding-top: 1.5em; }
.woocommerce .star-rating span::before { content: "SSSSS"; top: 0; position: absolute; left: 0; }

/* ช่องให้คะแนนในฟอร์มรีวิว (ผู้ซื้อที่ล็อกอิน) */
.woocommerce p.stars a {
  position: relative; display: inline-block; width: 1em; height: 1em;
  font-size: 24px; text-indent: -999em; text-decoration: none;
}
.woocommerce p.stars a::before {
  display: block; position: absolute; top: 0; left: 0; width: 1em; height: 1em;
  line-height: 1; font-family: WooCommerce; content: "\e021"; text-indent: 0;
}
.woocommerce p.stars a:hover ~ a::before { content: "\e021"; }
.woocommerce p.stars:hover a::before { content: "\e020"; }
.woocommerce p.stars.selected a.active::before { content: "\e020"; }
.woocommerce p.stars.selected a.active ~ a::before { content: "\e021"; }
.woocommerce p.stars.selected a:not(.active)::before { content: "\e020"; }

/* ---------- §2 ข้อความแจ้งเตือนของ Woo — หน้าตาเดียวกับหน้าบัญชี (account.css "WooCommerce notices") ---------- */
.irb-main .woocommerce-notices-wrapper:empty { display: none; }
.irb-main .woocommerce-notices-wrapper { display: flex; flex-direction: column; gap: 10px; margin: 0 0 24px; }
/* PDP: กล่องอยู่นอก .shell (ระหว่าง breadcrumb กับตัวสินค้า) → จัดกว้างเท่า .shell เอง */
.single-product .irb-main > .woocommerce-notices-wrapper {
  max-width: var(--irb-shell); margin: 16px auto 24px; padding: 0 var(--irb-pad);
}
.irb-main .woocommerce-error,
.irb-main .woocommerce-message,
.irb-main .woocommerce-info {
  --irb-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v6M12 7.5v.5'/%3E%3C/svg%3E");
  position: relative; list-style: none; margin: 0; padding: 16px 20px 16px 52px;
  border-radius: 18px; background: var(--brand-color-white); color: var(--brand-color-black);
  border: 1.5px solid rgba(var(--brand-color-clover-rgb), .45);
  font-size: 15px; line-height: 1.55;
}
.irb-main .woocommerce-message {
  --irb-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.irb-main .woocommerce-error {
  --irb-notice-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6 6 18'/%3E%3C/svg%3E");
  border: 2px solid var(--brand-color-black); font-weight: 600;
}
.irb-main .woocommerce-error li + li { margin-top: 6px; }
.irb-main .woocommerce-error::before,
.irb-main .woocommerce-message::before,
.irb-main .woocommerce-info::before {
  content: ""; position: absolute; left: 18px; top: 16px; width: 22px; height: 22px;
  background: var(--brand-color-hunter);
  -webkit-mask: var(--irb-notice-icon) center / contain no-repeat; mask: var(--irb-notice-icon) center / contain no-repeat;
}
.irb-main .woocommerce-error::before { background: var(--brand-color-black); }
.irb-main .woocommerce-error a,
.irb-main .woocommerce-message a,
.irb-main .woocommerce-info a {
  color: var(--brand-color-hunter); font-weight: 600; text-decoration: underline; text-underline-offset: 3px;
}
.irb-main .woocommerce-message .button,
.irb-main .woocommerce-info .button { float: none; display: inline-flex; margin-left: 8px; }
