/* =============================================================================
 * CHECKOUT PAGE (/checkout/)
 * =============================================================================
 * Page:   The shortcode checkout, template woocommerce/checkout/form-checkout.php.
 * Owner:  Child theme. Field list and labels: inc/checkout/fields.php.
 * Other checkout pieces have their own files:
 *   components/shipping-regions.css   the region cards ("وجهة الشحنة")
 *   components/payment-methods.css    the payment method card
 *   components/folder-modal.css       the discount code popup
 * This file holds what is specific to the checkout form itself.
 *
 * These two rules used to be at the end of style.css under "CHECKOUT: SINGLE ADDRESS FORM"
 * and were moved here unchanged, so every checkout rule is in one place.
 * ============================================================================= */

/* -----------------------------------------------------------------------------
 * 1. One address form
 * -----------------------------------------------------------------------------
 * The store ships to the billing address only, so checkout shows one form.
 * Hide the secondary shipping fields, the "ship to a different address" checkbox, the
 * additional-information block and WooCommerce's own shipping rows (the order summary shows
 * the shipping cost).
 * --------------------------------------------------------------------------- */
.woocommerce-shipping-fields,
#ship-to-different-address,
.woocommerce-additional-fields,
#shipping_method,
.woocommerce-shipping-totals {
    display: none !important;
}

/* Every remaining checkout field spans the full width. */
.woocommerce-checkout .form-row {
    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin-bottom: 14px !important;
}

/* -----------------------------------------------------------------------------
 * 2. Typed text must not look like a hint
 * -----------------------------------------------------------------------------
 * Measured on the rendered page: typed text and placeholder text had the same colour
 * (rgb 136,136,136 = --color-gray-400), so a filled field looked empty. Text a customer typed
 * (or the browser filled in) now uses --color-gray-700 (#333), a dark neutral. The heading and
 * body tokens are not used here: on this site they are the brand pink. A placeholder, if any
 * field gets one again, keeps the lighter --color-gray-400.
 * Scoped to the billing form so no other form of the site changes.
 * --------------------------------------------------------------------------- */
/* The parent theme sets the grey with ".woocommerce form.unimart-checkout-form .form-row
   input[type=text] ..." (4 classes, 2 elements). The selectors below repeat that chain and add
   ".woocommerce-checkout" in front, so they win by specificity and not by load order. */
.woocommerce-checkout form.unimart-checkout-form .form-row input.input-text,
.woocommerce-checkout form.unimart-checkout-form .form-row textarea,
.woocommerce-checkout form.unimart-checkout-form .form-row select {
    color: var(--color-gray-700, #333);
}

.woocommerce-checkout form.unimart-checkout-form .form-row input.input-text::placeholder,
.woocommerce-checkout form.unimart-checkout-form .form-row textarea::placeholder {
    color: var(--color-gray-400, #a3a3a3);
    opacity: 1;
}

/* -----------------------------------------------------------------------------
 * 3. The "add a discount code" link
 * -----------------------------------------------------------------------------
 * It opens the popup (#couponSelectionModal). The link is a flex row with the "+" icon first,
 * so in Arabic the icon is at the right and the text to its left. The theme gives the icon
 * "ms-a me-1" margins written for left-to-right; the spacing is set here with a logical
 * property so it is correct in either direction.
 * --------------------------------------------------------------------------- */
.woocommerce-checkout .unimart-promo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.woocommerce-checkout .unimart-promo-link > i {
    margin-inline: 0;
}
