/**
 * Big Pixel Studio - Donation block styling.
 *
 * Replaces the CSS that was pasted into
 * Content > Design > Configuration > HTML Head > Scripts and Style Sheets.
 * Keeping it there meant it lived outside version control, applied to a single
 * scope, and was invisible to anyone reading the codebase.
 *
 * REMOVE THE ADMIN BLOCK once this is deployed, or the rules are declared twice.
 */

/* -------------------------------------------------------------------------
   Hide the "required" asterisk on the donation headings

   MageWorx hardcodes <span class="required">*</span> after the heading in both
   cart/donation_wrapper.phtml and the mageworx-donation-form Knockout template.
   A donation is optional, so marking the block as a required field is
   misleading.

   Done in CSS rather than by overriding those two templates on purpose. A
   template override means shipping a copy of a vendor file that has to be
   re-diffed on every MageWorx update, and the Knockout one is a static asset
   that takes the whole form down if static content is not redeployed.
   ------------------------------------------------------------------------- */

#block-donation .title .required,
#mageworx-donation-container .title .required,
#mageworx-donation-form .title .required {
    display: none;
}

/* -------------------------------------------------------------------------
   Donation block presentation

   These rules are as tuned against the live storefront. Do not "tidy" them
   without checking the cart and checkout side by side - the two render the same
   markup inside different wrappers, so several of these exist specifically to
   reconcile that.
   ------------------------------------------------------------------------- */

#mageworx-donation-container .title {
    font-size: 18px;
    padding-top: 15px;
}

#mageworx-donation-container .title span {
    font-weight: 500;
}

#mageworx-donation-form .title strong span {
    font-weight: 300;
    padding-bottom: 10px;
}

#mageworx-donation-container button {
    margin-top: 10px;
}

/* Cart summary sits in a narrower column than the checkout sidebar. */
.cart-summary #mageworx-donation-form .title {
    padding-left: 0px;
}

.cart-summary #block-donation-summary {
    padding-bottom: 0px;
}

/**
 * Keep the collapsible arrow visible on the cart block.
 *
 * An earlier version of this file hid it, on the reasoning that checkout has no
 * collapsible and hiding the arrow made the two match. That was wrong: the arrow
 * is the affordance telling the shopper the section opens, and without it a
 * collapsed block reads as a broken one. The !important is needed to beat the
 * theme's own rule.
 */
#block-donation-wrapper #block-donation > .title:after {
    display: block !important;
}
