/**
 * Scopione — Info Pages Stylesheet
 * 
 * Styles exclusively for standard WordPress Pages (rendered by page.php).
 * Excludes WooCommerce pages (cart, checkout, account, shop, products).
 * 
 * Conditionally enqueued via functions.php on qualifying pages only.
 * 
 * @package Scopione_Child
 * @since 1.0.0
 */

/* ==========================================================
   SCOPIONE — Info Pages: Images + Captions (SIMPLE + SAFE)
   - 8px radius on ALL images
   - NO hover effects
   - Mobile: alignleft/alignright images centered + full width
   - Captions centered (no drifting)
   ========================================================== */

body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay){
  --sc-info-img-radius: 8px;
}

/* ---------- Readability: type rhythm for long-form pages ---------- */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(p, li){
  line-height: 1.7;
}

body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(li){
  margin-bottom: .35em;
}

/* ---------- Base: cover WP core + Kadence Blocks common outputs ---------- */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(img){
  border-radius: var(--sc-info-img-radius) !important;
  display: block;
  height: auto;
  max-width: 100%;
}

/* Gallery images: don't force display:block (preserves grid/flex layouts) */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(.wp-block-gallery, .gallery, .kb-gallery-ul, .blocks-gallery-grid) img{
  display: inherit;
}

/* If image is inside a link, clip overlays & keep rounded corners */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(figure a, .wp-block-image a, a:has(> img)){
  border-radius: var(--sc-info-img-radius) !important;
  overflow: hidden !important;
  display: inline-block;
  max-width: 100%;
}

/* :has() fallback — round the img directly for older browsers */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
a > img{
  border-radius: var(--sc-info-img-radius) !important;
}

/* Figure wrapper should not constrain width unexpectedly */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(figure, .wp-block-image){
  max-width: 100%;
}

/* Captions: always centered and cleared so they don't "merge" to the side */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(figcaption, .wp-element-caption){
  display: block !important;
  width: auto !important;
  max-width: 100% !important;
  text-align: center !important;
  margin: 12px auto 0 !important;
  clear: both !important;
  font-size: .875rem;
  color: rgba(17,17,17,.72);
}

/* ---------- Mobile: force TRUE centering for left/right aligned images ---------- */
@media (max-width: 768px){

  /* Reset classic floats + block editor alignment wrappers */
  body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
  :where(.entry-content, .wp-site-blocks, .site-main, main)
  :where(
    figure.alignleft,
    figure.alignright,
    .wp-block-image.alignleft,
    .wp-block-image.alignright,
    .alignleft,
    .alignright
  ){
    float: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 16px auto !important;
    clear: both !important;
  }

  /* Make the actual image fill the container and be centered */
  body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
  :where(.entry-content, .wp-site-blocks, .site-main, main)
  :where(
    figure.alignleft img,
    figure.alignright img,
    .wp-block-image.alignleft img,
    .wp-block-image.alignright img,
    img.alignleft,
    img.alignright
  ){
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /* Defensive: if a parent has text-align:right/left, neutralize it for media blocks */
  body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
  :where(.entry-content, .wp-site-blocks, .site-main, main)
  :where(figure.alignleft, figure.alignright, .wp-block-image.alignleft, .wp-block-image.alignright){
    text-align: center !important;
  }
}

/* ==========================================================
   SCOPIONE — Info Pages: Caption Links (INLINE + CLEAN)
   Fix: links inside image captions not aligning with caption text
   ========================================================== */

/* Keep caption links as true inline text (no block/button behavior) */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(figcaption, .wp-element-caption)
a{
  display: inline !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  font: inherit !important;
  line-height: inherit !important;
  vertical-align: baseline !important;
  color: inherit !important;
  text-decoration-line: underline !important;
  text-decoration-color: rgba(255,190,61,.6) !important;
  text-decoration-thickness: from-font !important;
  text-underline-offset: .18em !important;
}

/* Caption link hover: gold underline intensifies */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(figcaption, .wp-element-caption)
a:hover{
  text-decoration-color: #ffbe3d !important;
  color: #111 !important;
}

/* Caption link active: mobile tap feedback */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(figcaption, .wp-element-caption)
a:active{
  text-decoration-color: #ffbe3d !important;
  color: #111 !important;
}

/* If Kadence/blocks applied button-like styles to caption links */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(figcaption, .wp-element-caption)
:where(a, a.wp-block-button__link, .kb-button, .kt-button){
  display: inline !important;
  border-radius: 0 !important;
}

/* Focus-visible for keyboard nav on caption links */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(figcaption, .wp-element-caption)
a:focus-visible{
  outline: 2px solid #ffbe3d;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================
   SCOPIONE — Info Pages: In-Content Links (BRAND-ALIGNED)
   - Gold underline on body text links
   - Hover intensifies to full #ffbe3d
   - Focus-visible ring for keyboard nav
   - Excludes styled buttons (CTA, Kadence)
   ========================================================== */

/* ---------- In-content links: brand-aligned underline + hover ---------- */
body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(p, li, td, dd)
a:not(.button):not(.wp-block-button__link):not(.kb-button){
  text-decoration-line: underline;
  text-decoration-color: rgba(255,190,61,.45);
  text-underline-offset: .18em;
  text-decoration-thickness: 1.5px;
  transition: text-decoration-color .15s ease;
}

body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(p, li, td, dd)
a:not(.button):not(.wp-block-button__link):not(.kb-button):hover{
  text-decoration-color: #ffbe3d;
}

body.page:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag):not(.woocommerce):not(.woocommerce-page):not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account):not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(p, li, td, dd)
a:not(.button):not(.wp-block-button__link):not(.kb-button):focus-visible{
  outline: 2px solid #ffbe3d;
  outline-offset: 2px;
  border-radius: 2px;
}

/* ==========================================================
   SCOPIONE — Info Pages: Tables (SIMPLE + SAFE) — Cart/Checkout Safe
   - Info pages only (excludes Woo pages + Woo tables)
   - Clean premium grid, 8px radius, zebra rows
   - Mobile: horizontal scroll (no broken layouts)
   ========================================================== */

/* Body-scope gate (IMPORTANT): exclude Woo body classes that actually exist */
body.page
:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
:not(.woocommerce):not(.woocommerce-page)
:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
:not(.woocommerce-order-received):not(.woocommerce-order-pay){
  --sc-table-radius: 8px;
  --sc-table-border: rgba(17,17,17,.14);
  --sc-table-head-bg: #111;
  --sc-table-head-fg: #fff;
  --sc-table-zebra: rgba(0,0,0,.045);
  --sc-table-accent: rgba(255,190,61,.65);
}

/* Define "safe tables" = not WooCommerce operational tables */
body.page
:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
:not(.woocommerce):not(.woocommerce-page)
:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
:not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(table):not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table){
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border: 1px solid var(--sc-table-border) !important;
  border-radius: var(--sc-table-radius) !important;
  background: #fff;
}

/* Cells */
body.page
:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
:not(.woocommerce):not(.woocommerce-page)
:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
:not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(
  table:not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table) th,
  table:not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table) td
){
  border-right: 1px solid var(--sc-table-border) !important;
  border-bottom: 1px solid var(--sc-table-border) !important;
  padding: 14px !important;
  vertical-align: middle !important;
  text-align: left;
  line-height: 1.35;
}

/* Remove last borders */
body.page
:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
:not(.woocommerce):not(.woocommerce-page)
:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
:not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(
  table:not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table) tr > *:last-child
){
  border-right: 0 !important;
}

body.page
:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
:not(.woocommerce):not(.woocommerce-page)
:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
:not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(
  table:not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table) tbody tr:last-child > *
){
  border-bottom: 0 !important;
}

/* Header row */
body.page
:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
:not(.woocommerce):not(.woocommerce-page)
:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
:not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(
  table:not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table) thead th
){
  background: var(--sc-table-head-bg) !important;
  color: var(--sc-table-head-fg) !important;
  font-weight: 800 !important;
  letter-spacing: .01em;
  border-bottom: 2px solid var(--sc-table-accent) !important;
}

/* Zebra rows (body only) */
body.page
:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
:not(.woocommerce):not(.woocommerce-page)
:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
:not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(
  table:not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table) tbody tr:nth-child(even) > *
){
  background: var(--sc-table-zebra) !important;
}

/* Strong first column */
body.page
:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
:not(.woocommerce):not(.woocommerce-page)
:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
:not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(
  table:not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table) tbody td:first-child
){
  font-weight: 700;
}

/* Numeric alignment nicety */
body.page
:not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
:not(.woocommerce):not(.woocommerce-page)
:not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
:not(.woocommerce-order-received):not(.woocommerce-order-pay)
:where(.entry-content, .wp-site-blocks, .site-main, main)
:where(
  table:not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table) td
){
  font-variant-numeric: tabular-nums;
}

/* Mobile safety: table becomes its own scroll container */
@media (max-width: 768px){

  /* Table = scroll container (display:block + overflow-x:auto + max-width:100%
     constrains the table to its parent width; overflowing content scrolls inside) */
  body.page
  :not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
  :not(.woocommerce):not(.woocommerce-page)
  :not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
  :not(.woocommerce-order-received):not(.woocommerce-order-pay)
  :where(.entry-content, .wp-site-blocks, .site-main, main)
  :where(table):not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table){
    display: block !important;
    overflow-x: auto !important;
    max-width: 100% !important;
    border-radius: var(--sc-table-radius) !important;
  }

  /* Prevent header cells from wrapping — forces table wider than viewport to trigger scroll */
  body.page
  :not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
  :not(.woocommerce):not(.woocommerce-page)
  :not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
  :not(.woocommerce-order-received):not(.woocommerce-order-pay)
  :where(.entry-content, .wp-site-blocks, .site-main, main)
  :where(
    table:not(.shop_table):not(.woocommerce-table):not(.woocommerce-checkout-review-order-table) th
  ){
    white-space: nowrap;
  }

  /* Wrapper: position context for the swipe hint */
  body.page
  :not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
  :not(.woocommerce):not(.woocommerce-page)
  :not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
  :not(.woocommerce-order-received):not(.woocommerce-order-pay)
  :where(.entry-content, .wp-site-blocks, .site-main, main)
  :where(figure.wp-block-table, .wp-block-table){
    position: relative;
    margin-bottom: 10px;
  }

  /* "Swipe to view more" hint text below the table wrapper */
  body.page
  :not(.single-product):not(.archive):not(.tax-product_cat):not(.tax-product_tag)
  :not(.woocommerce):not(.woocommerce-page)
  :not(.woocommerce-cart):not(.woocommerce-checkout):not(.woocommerce-account)
  :not(.woocommerce-order-received):not(.woocommerce-order-pay)
  :where(.entry-content, .wp-site-blocks, .site-main, main)
  :where(figure.wp-block-table, .wp-block-table)::after{
    content: "Swipe to view more →";
    display: block;
    margin: 10px 0 0;
    text-align: center;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .02em;
    color: rgba(17,17,17,.75);
  }
}

/* ==========================================================
   END SCOPIONE — Info Pages Stylesheet
   ========================================================== */
