/*
  Hanout Form Enhancer - order summary row dividers + overflow containment

  Always enqueued regardless of any other setting (includes/frontend.php),
  which is why the overflow-containment rules further down in this file
  live here rather than in a conditionally-loaded stylesheet - see the
  comment above #codplugin_show_hide below for why that matters.

  Hanout's own theme CSS draws a dotted line under every cell of the order
  summary table:

    #codplugin-checkout td {
        border-bottom: 2px dotted #bce0f7;
    }

  - confirmed in inc/order-form/include/assets/css/codplugin.css. That
  selector also matches the unrelated variable-product price table
  (.variation-prices, same main.php, same #codplugin-checkout ancestor), so
  rather than touching the theme file or disabling that rule everywhere,
  this file only re-declares the border on #codplugin_show_hide - the order
  summary table specifically - leaving every other table under
  #codplugin-checkout exactly as the theme draws it.

  #codplugin_show_hide td and #codplugin-checkout td are both a single ID
  selector plus a type selector, i.e. identical specificity, so this needs
  !important to reliably win regardless of which stylesheet the browser
  happens to parse second.
*/

#codplugin_show_hide td {
    border-bottom: none !important;
    padding-top: 10px;
    padding-bottom: 10px;
}

#codplugin_show_hide tr:first-child td {
    padding-top: 4px;
}

/* Total Price row: a plain solid line instead of the dotted one it lost,
   so the total still reads as visually separated from the rows above it. */
#codplugin_show_hide .full-price td {
    padding-top: 14px;
    border-top: 1px solid #e3e8ee !important;
}

/*
  --- Unconditional overflow containment (1.8.3) ---

  #codplugin_show_hide is Hanout's own order-summary <table> (confirmed in
  inc/order-form/include/core/main.php) - auto table layout, no
  table-layout:fixed. The row holding #shipping-methods shares that row
  with the price/"FREE" <td>s, so if a card layout's grid ever needs more
  minimum width than the row has left on a narrow phone, the whole table -
  and with it #codplugin-checkout, the entire order-form box - gets
  pushed wider than the viewport, dragging every element in it
  (badges, price labels, etc.) off-screen.

  This exact containment already existed in assets/css/shipping-position.css,
  but only applied when "Shipping method location" is set to "Above the
  confirm button" - that file is conditionally enqueued for that setting
  only (includes/frontend.php). #codplugin_show_hide exists regardless of
  that setting, so the same protection belongs here instead, in a
  stylesheet that's always enqueued, unconditionally covering the default
  ("Original") location too. This is a backstop on top of the actual grid
  fix in layout-large.css / layout-compact_grid.css, not a replacement for
  it - kept here so any future card layout is covered automatically even
  if it forgets its own min-width:0.
*/
#codplugin_show_hide {
    max-width: 100%;
    overflow-x: hidden;
}

#shipping-methods {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

#shipping-methods * {
    max-width: 100%;
    box-sizing: border-box;
}
