/* dochoixehoi.com v0.3.37 — distinguish article links from UX / TOC links.
 * Fix: a[href]:not(...) is ONE compound selector. In v0.3.36 stray
 * whitespace before :not made the rule target descendants, not the anchor.
 * Keep links inline and keep existing HTML/URLs unchanged.
 */

/* Ordinary editorial links (posts, pages, WooCommerce descriptions). */
:is(.tpa-prose, .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-product-tabs-wrap .panel, .woocommerce-product-details__short-description,
    .tpa-product-intro.is-prose)
 a[href]:not(:is(.button,.tpa-button,.tpa-ux-button,.wp-block-button__link,
                  .tpa-ux-gallery-link,.tpa-ux-image-link,.tpa-ux-banner-link,
                  .tpa-card-link)):not(:has(img,picture,svg)):not(:is(
          .tpa-legacy-ux-block a, .tpa-ux-content a,
          .ux-block a, .ux-block-content a, [data-ux-block] a,
          .tpa-content-toc a, #ez-toc-container a, .ez-toc-container a,
          #toc_container a, .toc_container a, .toc-container a,
          .lwptoc a, .rank-math-toc-block a,
          .wp-block-rank-math-toc-block a, .yoast-table-of-contents a,
          .wp-block-table-of-contents a)){
  color:#0969bd!important;
  -webkit-text-fill-color:#0969bd!important;
  text-decoration:underline!important;
  text-decoration-thickness:1px!important;
  text-underline-offset:3px;
  display:inline!important;
  float:none!important;
  clear:none!important;
  width:auto!important;
  max-width:100%!important;
  margin:0!important;
  line-height:inherit;
  white-space:normal!important;
  overflow-wrap:break-word;
  word-break:normal;
}
:is(.tpa-prose, .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-product-tabs-wrap .panel, .woocommerce-product-details__short-description,
    .tpa-product-intro.is-prose)
 a[href]:not(:is(.button,.tpa-button,.tpa-ux-button,.wp-block-button__link,
                  .tpa-ux-gallery-link,.tpa-ux-image-link,.tpa-ux-banner-link,
                  .tpa-card-link)):not(:has(img,picture,svg)):not(:is(
          .tpa-legacy-ux-block a, .tpa-ux-content a,
          .ux-block a, .ux-block-content a, [data-ux-block] a,
          .tpa-content-toc a, #ez-toc-container a, .ez-toc-container a,
          #toc_container a, .toc_container a, .toc-container a,
          .lwptoc a, .rank-math-toc-block a,
          .wp-block-rank-math-toc-block a, .yoast-table-of-contents a,
          .wp-block-table-of-contents a)):is(:hover,:focus-visible){
  color:#c5222a!important;
  -webkit-text-fill-color:#c5222a!important;
  text-decoration-thickness:2px!important;
}
/* Old editors often wrap text links in an inline black-styled <span>. */
:is(.tpa-prose, .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-product-tabs-wrap .panel, .woocommerce-product-details__short-description,
    .tpa-product-intro.is-prose)
 a[href]:not(:is(.button,.tpa-button,.tpa-ux-button,.wp-block-button__link)):not(:has(img,picture,svg)):not(:is(
          .tpa-legacy-ux-block a, .tpa-ux-content a,
          .ux-block a, .ux-block-content a, [data-ux-block] a,
          .tpa-content-toc a, #ez-toc-container a, .ez-toc-container a,
          #toc_container a, .toc_container a, .toc-container a,
          .lwptoc a, .rank-math-toc-block a,
          .wp-block-rank-math-toc-block a, .yoast-table-of-contents a,
          .wp-block-table-of-contents a)) :is(span,strong,b,em,i,u,font){
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
}
@media(max-width:540px){
  :is(.tpa-prose,.woocommerce div.product .woocommerce-tabs .panel,
      .tpa-product-tabs-wrap .panel,.woocommerce-product-details__short-description)
    a[href]{overflow-wrap:break-word}
}

/* TOC: links in the article navigation use ordinary text color, no underlines.
 * They remain clickable; button/link mechanics of the TOC are not changed. */
:is(.tpa-content-toc, #ez-toc-container, .ez-toc-container,
    #toc_container, .toc_container, .toc-container,
    .lwptoc, .rank-math-toc-block, .wp-block-rank-math-toc-block,
    .yoast-table-of-contents, .wp-block-table-of-contents)
 a[href]{
  color:#30353a!important;
  -webkit-text-fill-color:#30353a!important;
  text-decoration:none!important;
  text-shadow:none!important;
  background-image:none!important;
  box-shadow:none!important;
}
:is(.tpa-content-toc, #ez-toc-container, .ez-toc-container,
    #toc_container, .toc_container, .toc-container,
    .lwptoc, .rank-math-toc-block, .wp-block-rank-math-toc-block,
    .yoast-table-of-contents, .wp-block-table-of-contents)
 a[href]:is(:hover,:focus-visible){
  color:#815514!important;
  -webkit-text-fill-color:#815514!important;
  text-decoration:none!important;
}
:is(.tpa-content-toc, #ez-toc-container, .ez-toc-container,
    #toc_container, .toc_container, .toc-container,
    .lwptoc, .rank-math-toc-block, .wp-block-rank-math-toc-block,
    .yoast-table-of-contents, .wp-block-table-of-contents)
 a[href] :is(span,strong,b,em,i,u,font){
  color:inherit!important;
  -webkit-text-fill-color:inherit!important;
  text-decoration:none!important;
}

/* UX Blocks: body-text links blend into the block, including contact data.
 * Intentionally exclude link-buttons and thumbnail links, whose special colors
 * and display layout are owned by their components. */
:is(.tpa-legacy-ux-block, [data-ux-block], .tpa-ux-content,
    .ux-block, .ux-block-content, .tpa-ux-preview-canvas)
 a[href]:not(:is(.button,.tpa-button,.tpa-ux-button,.wp-block-button__link,
                   .tpa-ux-gallery-link,.tpa-ux-image-link,.tpa-ux-banner-link)){
  color:inherit!important;
  -webkit-text-fill-color:currentColor!important;
  text-decoration:none!important;
  text-shadow:none!important;
  box-shadow:none!important;
}
:is(.tpa-legacy-ux-block, [data-ux-block], .tpa-ux-content,
    .ux-block, .ux-block-content, .tpa-ux-preview-canvas)
 a[href]:not(:is(.button,.tpa-button,.tpa-ux-button,.wp-block-button__link,
                   .tpa-ux-gallery-link,.tpa-ux-image-link,.tpa-ux-banner-link))
 :is(span,strong,b,em,i,u,font){
  color:inherit!important;
  -webkit-text-fill-color:currentColor!important;
  text-decoration:none!important;
}
:is(.tpa-legacy-ux-block, [data-ux-block], .tpa-ux-content,
    .ux-block, .ux-block-content, .tpa-ux-preview-canvas)
 a[href]:not(:is(.button,.tpa-button,.tpa-ux-button,.wp-block-button__link,
                   .tpa-ux-gallery-link,.tpa-ux-image-link,.tpa-ux-banner-link))
:is(:hover,:focus-visible){
  color:#815514!important;
  -webkit-text-fill-color:#815514!important;
  text-decoration:none!important;
}

/* TOC toggle: only the icon should be visible. Preserve the original element
 * and its click/keyboard handlers; label is set in JS for accessibility. */
.tpa-content-toc .tpa-toc-toggle-control{
  text-decoration:none!important;
  white-space:nowrap;
}
.tpa-content-toc .tpa-toc-toggle-icon{
  display:inline-block;
  width:16px;
  height:14px;
  vertical-align:-2px;
  background:linear-gradient(currentColor,currentColor) center 2px/15px 2px no-repeat,
             linear-gradient(currentColor,currentColor) center 7px/15px 2px no-repeat,
             linear-gradient(currentColor,currentColor) center 12px/15px 2px no-repeat;
}

/* Justify prose paragraphs only: do not touch headings, lists, table cells,
 * gallery captions, TOC text, UX Blocks, explicit center/right formatting or
 * the right-aligned end-of-article greeting. */
:is(.tpa-prose, .tpa-product-tabs-wrap .woocommerce-tabs .panel,
    .woocommerce div.product .woocommerce-tabs .panel,
    .woocommerce-product-details__short-description)
 p:not(:is(.tpa-editorial-signoff, .has-text-align-center,.has-text-align-right,
           .aligncenter,.alignright,[align="center"],[align="right"],
           [style*="text-align:right"],[style*="text-align: right"],
           [style*="text-align:center"],[style*="text-align: center"],
           .ez-toc-title,.toc-title,.lwptoc_title)):not(:is(.tpa-content-toc p, #ez-toc-container p, .ez-toc-container p,
           #toc_container p, .toc_container p, .toc-container p,
           .lwptoc p, .rank-math-toc-block p, .wp-block-rank-math-toc-block p,
           .yoast-table-of-contents p, .wp-block-table-of-contents p,
           .tpa-legacy-ux-block p, [data-ux-block] p, .tpa-ux-content p,
           .ux-block p, .ux-block-content p)){
  text-align:justify!important;
  text-justify:inter-word;
}

/* Editorial HTML tables: target every normal post/page/product description.
 * The previous patch only loaded the Core gallery CSS when a UX shortcode
 * was in the content; ordinary specification tables were therefore missed.
 * !important is necessary because WooCommerce and migrated HTML tables may
 * explicitly set border:0 on cells. Do not touch commerce/shop tables. */
:is(.tpa-prose, .tpa-product-tabs-wrap .woocommerce-tabs .panel,
    .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-legacy-ux-block, .tpa-ux-preview-canvas)
  table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes):not(.wc-block-cart-items){
  width:100% !important;
  max-width:100% !important;
  border:1px solid #c9d1dc !important;
  border-collapse:collapse !important;
  border-spacing:0 !important;
  margin:16px 0 22px !important;
  background:#fff;
}
:is(.tpa-prose, .tpa-product-tabs-wrap .woocommerce-tabs .panel,
    .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-legacy-ux-block, .tpa-ux-preview-canvas)
  table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes):not(.wc-block-cart-items) :is(th,td){
  box-sizing:border-box;
  border:1px solid #c9d1dc !important;
  padding:11px 13px !important;
  vertical-align:top;
  background-clip:padding-box;
}
:is(.tpa-prose, .tpa-product-tabs-wrap .woocommerce-tabs .panel,
    .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-legacy-ux-block, .tpa-ux-preview-canvas)
  table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes):not(.wc-block-cart-items) thead th{
  background-color:#f2f5f8 !important;
  font-weight:700;
}
:is(.tpa-prose, .tpa-product-tabs-wrap .woocommerce-tabs .panel,
    .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-legacy-ux-block, .tpa-ux-preview-canvas)
  table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes):not(.wc-block-cart-items) tbody tr:nth-child(even){
  background-color:#fafbfd;
}
@media(max-width:540px){
  :is(.tpa-prose, .tpa-product-tabs-wrap .woocommerce-tabs .panel,
      .woocommerce div.product .woocommerce-tabs .panel,
      .tpa-legacy-ux-block, .tpa-ux-preview-canvas)
    table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes):not(.wc-block-cart-items) :is(th,td){
      padding:8px 9px !important;
      overflow-wrap:anywhere;
    }
}

/* v0.3.36 — Keep migrated product descriptions within their content column.
 * Both gallery images and large tables have appeared beside long sign-off text
 * beyond the right edge. Limit descendants instead of clipping the whole page.
 */
.woocommerce div.product .tpa-product-content-grid,
.woocommerce div.product .tpa-product-tabs-wrap,
.woocommerce div.product .woocommerce-tabs,
.tpa-prose{
  box-sizing:border-box;
  min-width:0;
}
.woocommerce div.product .woocommerce-tabs .panel,
.woocommerce div.product .woocommerce-tabs .panel .tpa-readmore-content{
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
}
.woocommerce div.product .woocommerce-tabs .panel :is(p,figure,blockquote,div),
.tpa-prose :is(p,figure,blockquote){
  max-width:100%;
  box-sizing:border-box;
  overflow-wrap:break-word;
}
/* Float-based layouts imported from Classic Editor may push the next sentence
 * into the adjacent narrow strip. Editorial images sit on their own row. */
:is(.tpa-prose, .woocommerce div.product .woocommerce-tabs .panel)
  :is(img,figure,.wp-caption,.wp-block-image):is(.alignleft,.alignright){
  float:none!important;
  clear:both!important;
  display:block;
  margin-left:auto!important;
  margin-right:auto!important;
  max-width:100%!important;
}
:is(.tpa-prose, .woocommerce div.product .woocommerce-tabs .panel)
  :is(p,figure):has(>img,>a>img){
  max-width:100%;
  clear:both;
}
:is(.tpa-prose, .woocommerce div.product .woocommerce-tabs .panel)
  :is(p,figure):has(>img,>a>img) + p{
  clear:both;
}
/* WYSIWYG layout tables can contain 700px images plus a long sentence.
 * Use a fixed column track to prevent a large cell from expanding the page.
 * This also protects the bordered specification tables. */
:is(.tpa-prose, .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-legacy-ux-block, .tpa-ux-preview-canvas)
 table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes):not(.wc-block-cart-items){
  table-layout:fixed!important;
  width:100%!important;
  max-width:100%!important;
}
:is(.tpa-prose, .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-legacy-ux-block, .tpa-ux-preview-canvas)
 table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes):not(.wc-block-cart-items) :is(th,td){
  min-width:0;
  max-width:100%;
  white-space:normal!important;
  overflow-wrap:anywhere;
  word-break:normal;
}
:is(.tpa-prose, .woocommerce div.product .woocommerce-tabs .panel,
    .tpa-legacy-ux-block, .tpa-ux-preview-canvas)
 table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes):not(.wc-block-cart-items) img{
  display:block;
  max-width:100%!important;
  height:auto!important;
}
/* Inline backlinks are allowed to wrap naturally with the surrounding text;
 * the old nowrap rule made the paragraph break the product column on mobile. */
:is(.tpa-prose,.woocommerce div.product .woocommerce-tabs .panel,
    .woocommerce-product-details__short-description)
 a[href]:not(.button):not(:has(img,picture,svg)){
  white-space:normal!important;
  overflow-wrap:break-word;
}
/* Avoid forcing end-of-article notes to a wider size than their parent. */
.tpa-prose .tpa-editorial-signoff,
.woocommerce div.product .woocommerce-tabs .panel .tpa-editorial-signoff{
  max-width:100%!important;
  width:auto!important;
  min-width:0;
  overflow-wrap:break-word;
}

/* Some imported Classic Editor markup closes the description panel before a
 * layout table finishes. The content remains inside the tabs wrapper: apply
 * the same width safeguards there, including to those legacy tables. */
.woocommerce div.product .tpa-product-tabs-wrap :is(table,figure,img){
  max-width:100%!important;
}
.woocommerce div.product .tpa-product-tabs-wrap
 table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes){
  box-sizing:border-box;
  width:100%!important;
  table-layout:fixed!important;
  border-collapse:collapse;
}
.woocommerce div.product .tpa-product-tabs-wrap
 table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes) :is(th,td){
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
  white-space:normal!important;
}
.woocommerce div.product .tpa-product-tabs-wrap
 table:not(.shop_table):not(.variations):not(.woocommerce-product-attributes) img{
  display:block;
  max-width:100%!important;
  width:auto;
  height:auto;
}
@media(max-width:700px){
  /* Image-and-text layout tables from migrated WordPress content stack on
   * small screens rather than rendering two unusably narrow columns. */
  .woocommerce div.product .tpa-product-tabs-wrap
   table:not(.shop_table):not(.variations):has(img) :is(tbody,tr,td){
    display:block;
    width:100%!important;
    max-width:100%!important;
  }
}


/* End-of-article brand credit: keep the hyperlink together with its sentence.
 * Balance the paragraph, not a whole section/table; on narrow screens text
 * still wraps normally instead of overflowing the viewport. */
:is(.tpa-prose,.woocommerce div.product .woocommerce-tabs .panel,
    .tpa-product-tabs-wrap .panel,.woocommerce-product-details__short-description)
 .tpa-editorial-signoff{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  text-wrap:balance;
  overflow-wrap:break-word;
}
:is(.tpa-prose,.woocommerce div.product .woocommerce-tabs .panel,
    .tpa-product-tabs-wrap .panel)
 .tpa-editorial-signoff a[href]{display:inline!important;white-space:normal!important}
