/*
 * Gallows West — Cart & Checkout polish
 * Intentionally scoped to WooCommerce Cart/Checkout block classes.
 */

/* ---------- Cart / checkout product imagery ---------- */
/* Safety net: even if another extension exposes more than one image node,
   only the first image should be visible in a cart/summary image area. */
.wc-block-cart-items .wc-block-cart-item__image img ~ img,
.wc-block-components-order-summary-item__image img ~ img {
    display: none !important;
}

/* Keep the product thumbnail compact and aligned with the product text. */
.wc-block-cart-items .wc-block-cart-item__image,
.wc-block-components-order-summary-item__image {
    align-self: start;
}

.wc-block-cart-items .wc-block-cart-item__image img,
.wc-block-components-order-summary-item__image img {
    max-width: 96px !important;
    height: auto !important;
    object-fit: cover;
}

/* ---------- Personalization / product metadata ---------- */
/* This is where Product Input Fields places values such as
   “Signed? If yes, to whom?: POOKIE”. Make it unmistakable. */
.wc-block-components-product-metadata,
.wc-block-components-product-details {
    margin-top: 8px !important;
}

.wc-block-components-product-details,
.wc-block-components-product-details li,
.wc-block-components-product-details__name,
.wc-block-components-product-details__value,
.wc-block-components-product-metadata,
.wc-block-components-product-metadata * {
    font-size: 15px !important;
    line-height: 1.35 !important;
}

.wc-block-components-product-details__name,
.wc-block-components-product-details__value {
    font-weight: 700 !important;
}

/* Give the personalization line a little breathing room in both Cart and
   the Checkout order summary without changing the rest of the theme. */
.wc-block-cart-items .wc-block-components-product-metadata,
.wc-block-components-order-summary .wc-block-components-product-metadata,
.wc-block-cart-items .wc-block-components-product-details,
.wc-block-components-order-summary .wc-block-components-product-details {
    padding-top: 3px;
    padding-bottom: 3px;
}

/* ---------- Checkout form readability ---------- */
/* The store uses light/white controls on a dark page. Floating labels need
   dark text once they sit inside those light controls. */
.wc-block-checkout .wc-block-components-text-input label,
.wc-block-checkout .wc-block-components-combobox .wc-block-components-combobox-control label,
.wc-block-checkout .wc-block-components-country-input label,
.wc-block-checkout .wc-block-components-state-input label {
    color: #3a2117 !important;
    opacity: 1 !important;
    font-weight: 600 !important;
}

.wc-block-checkout .wc-block-components-text-input input,
.wc-block-checkout .wc-block-components-combobox input,
.wc-block-checkout .wc-block-components-address-form input,
.wc-block-checkout .wc-block-components-address-form select {
    color: #24120c !important;
    background: #fffdf8 !important;
    border-color: #8a725d !important;
}

.wc-block-checkout .wc-block-components-text-input input::placeholder,
.wc-block-checkout .wc-block-components-address-form input::placeholder {
    color: #6f5a49 !important;
    opacity: 1 !important;
}

/* Dropdown / state selectors. */
.wc-block-checkout .wc-block-components-combobox-control input,
.wc-block-checkout .wc-block-components-combobox-control button,
.wc-block-checkout .wc-block-components-address-form .wc-block-components-select__select,
.wc-block-checkout .wc-block-components-address-form select {
    color: #24120c !important;
}

/* Keep required/error messaging readable against the dark site background. */
.wc-block-checkout .wc-block-components-validation-error,
.wc-block-checkout .wc-block-components-validation-error p,
.wc-block-checkout .wc-block-components-validation-error > span {
    font-weight: 600;
}

@media (max-width: 600px) {
    .wc-block-cart-items .wc-block-cart-item__image img,
    .wc-block-components-order-summary-item__image img {
        max-width: 78px !important;
    }

    .wc-block-components-product-details,
    .wc-block-components-product-details li,
    .wc-block-components-product-details__name,
    .wc-block-components-product-details__value,
    .wc-block-components-product-metadata,
    .wc-block-components-product-metadata * {
        font-size: 14px !important;
    }
}
