/*
 * Miner House — Cart & Checkout Styles
 * Loaded only on WooCommerce cart/checkout pages from child theme.
 */

body.woocommerce-cart,
body.woocommerce-checkout,
body.woocommerce-order-received {
    --mh-primary: #0a1a33;
    --mh-accent: #1a6fe0;
    --mh-success: #1a8a3c;
    --mh-surface: #ffffff;
    --mh-surface-alt: #f8f9fb;
    --mh-border: #e2e6ea;
    --mh-text: #1a1a2e;
    --mh-text-muted: #6b7280;
    --mh-radius: 8px;
    --mh-shadow-sm: 0 1px 4px rgba(0,0,0,.08);
}

/* Clean extra spacing caused by mixed Elementor + shortcode content */
.woocommerce-cart .entry-content > p:empty,
.woocommerce-cart .entry-content > br,
.woocommerce-checkout .entry-content > p:empty,
.woocommerce-checkout .entry-content > br {
    display: none;
}

/* Cart table card */
.woocommerce-cart .woocommerce-cart-form {
    background: var(--mh-surface);
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius);
    padding: 18px;
    margin-bottom: 20px;
    box-shadow: var(--mh-shadow-sm);
}

.woocommerce-cart table.shop_table {
    border: 0;
    margin: 0;
}

.woocommerce-cart table.shop_table th,
.woocommerce-cart table.shop_table td {
    border-color: var(--mh-border);
    vertical-align: middle;
}

.woocommerce-cart .product-name a {
    color: var(--mh-primary);
    font-weight: 600;
    text-decoration: none;
}

.woocommerce-cart .product-thumbnail img {
    border-radius: 6px;
    border: 1px solid var(--mh-border);
}

/* Quantity field */
.woocommerce-cart .quantity .qty {
    width: 78px;
    min-height: 38px;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    text-align: center;
}

/* Coupon + update actions */
.woocommerce-cart .actions .coupon .input-text,
.woocommerce-cart .actions .coupon input[type="text"] {
    min-height: 40px;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    padding: 0 10px;
}

.woocommerce-cart .actions .button,
.woocommerce-cart .button,
.woocommerce-checkout .button,
.woocommerce-checkout button.button,
.woocommerce-checkout #payment #place_order {
    border-radius: 6px;
    font-weight: 700;
}

.woocommerce-cart .actions .coupon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 8px;
}

.woocommerce-cart .actions .button[name="update_cart"] {
    display: none;
}

.woocommerce-cart a.checkout-button.button,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button,
.woocommerce-checkout #payment #place_order {
    background: var(--mh-primary) !important;
    color: #fff !important;
    border: 0;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 24px;
}

.woocommerce-cart a.checkout-button.button:hover,
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover,
.woocommerce-checkout #payment #place_order:hover {
    background: var(--mh-accent) !important;
}

/* Cart totals box */
.woocommerce-cart .cart-collaterals .cart_totals {
    background: var(--mh-surface);
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius);
    padding: 18px;
    box-shadow: var(--mh-shadow-sm);
    max-width: none;
    width: 100%;
}

.woocommerce-cart .cart-collaterals {
    display: block;
    margin-top: 14px;
}

.woocommerce-cart .cart_totals h2 {
    font-size: 1.2rem;
    color: var(--mh-primary);
    margin: 0 0 20px;
}

.woocommerce-cart .cart_totals .shop_table th {
    width: 36%;
    color: var(--mh-primary);
    font-weight: 700;
}

.woocommerce-cart .cart_totals .shop_table td,
.woocommerce-cart .cart_totals .shop_table th {
    padding: 12px 8px;
}

.woocommerce-cart .cart_totals .shop_table {
    background: var(--mh-surface-alt);
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 14px;
}

.woocommerce-cart .woocommerce-shipping-methods {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.woocommerce-cart .woocommerce-shipping-methods li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    background: #fff;
}

.woocommerce-cart .woocommerce-shipping-methods label {
    margin: 0;
    color: var(--mh-text);
    line-height: 1.45;
}

.woocommerce-cart .woocommerce-shipping-destination {
    margin: 10px 0 8px;
    color: var(--mh-text-muted);
    font-size: 0.92rem;
}

.woocommerce-cart .shipping-calculator-button {
    display: inline-block;
    font-weight: 600;
    color: var(--mh-accent);
    text-decoration: none;
}

.woocommerce-cart .mh-pickup-map-link {
    display: inline-block;
    margin-left: 6px;
    font-weight: 600;
    font-size: 0.84rem;
}

.woocommerce-cart .shipping-calculator-button:hover {
    text-decoration: underline;
}

.woocommerce-cart .shipping-calculator-form {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--mh-border);
}

.woocommerce-cart .shipping-calculator-form .form-row {
    margin-bottom: 10px;
}

.woocommerce-cart .shipping-calculator-form .form-row label {
    margin-bottom: 6px;
    display: block;
    color: var(--mh-primary);
    font-weight: 600;
}

.woocommerce-cart .shipping-calculator-form .input-text,
.woocommerce-cart .shipping-calculator-form select {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    padding: 0 10px;
    background: #fff;
}

.woocommerce-cart .wc-proceed-to-checkout p {
    margin: 0;
}

.woocommerce-cart .wc-proceed-to-checkout {
    margin-top: 10px;
}

.woocommerce-cart .wc-proceed-to-checkout .checkout-button {
    width: 100%;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button br {
    display: none;
}

.woocommerce-cart .order-total th,
.woocommerce-cart .order-total td {
    font-size: 1.06rem;
    font-weight: 700;
}

.woocommerce-cart .order-total td .amount {
    color: var(--mh-primary);
}

.woocommerce-cart .mh-cart-help-box {
    margin: 0 0 16px;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    background: #f8fbff;
    padding: 12px 14px;
}

.woocommerce-cart .mh-cart-help-box__title {
    color: var(--mh-primary);
    font-size: 0.92rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.woocommerce-cart .mh-cart-help-box__phone {
    display: inline-block;
    margin-left: 6px;
    color: var(--mh-accent);
    text-decoration: none;
    white-space: nowrap;
}

.woocommerce-cart .mh-cart-help-box__phone:hover {
    text-decoration: underline;
}

.woocommerce-cart .mh-cart-help-box__text {
    margin: 0 0 8px;
    color: var(--mh-text-muted);
    font-size: 0.86rem;
    line-height: 1.5;
}

.woocommerce-cart .mh-cart-help-box__list {
    margin: 0;
    padding-left: 16px;
    color: var(--mh-text);
    font-size: 0.86rem;
    line-height: 1.5;
}

.woocommerce-cart .mh-cart-help-box__list li {
    margin-bottom: 4px;
}

/* Cart: mining mode selector */
.woocommerce-cart .mh-mining-mode-box {
    margin: 0 0 16px;
    border: 1px solid #e8edf3;
    border-radius: 6px;
    background: #fff;
    padding: 14px;
}

.woocommerce-cart .mh-mining-mode-box__title {
    margin: 0 0 12px;
    color: var(--mh-primary);
    font-size: 1rem;
    font-weight: 700;
}

.woocommerce-cart .mh-mining-mode-box__badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    border: 1px solid #d9e6f7;
    border-radius: 999px;
    background: #f6f9fe;
    color: #6c7688;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    vertical-align: middle;
}

.woocommerce-cart .mh-mining-mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.woocommerce-cart .mh-mining-mode-option {
    border: 1px solid #e8edf3;
    border-radius: 6px;
    background: #fcfdff;
    padding: 10px;
    cursor: pointer;
    display: grid;
    grid-template-columns: 18px 1fr;
    column-gap: 8px;
    align-items: start;
}

.woocommerce-cart .mh-mining-mode-option.is-selected {
    border-color: #bfd9ff;
    background: #f7fbff;
}

.woocommerce-cart .mh-mining-mode-option input {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin: 2px 0 0;
}

.woocommerce-cart .mh-mining-mode-option__header {
    grid-column: 2;
    display: flex;
    align-items: center;
    gap: 8px;
}

.woocommerce-cart .mh-mining-mode-option__icon {
    width: 18px;
    height: 18px;
    color: var(--mh-accent);
    flex-shrink: 0;
}

.woocommerce-cart .mh-mining-mode-option__title {
    color: var(--mh-primary);
    font-weight: 700;
    display: inline;
}

.woocommerce-cart .mh-mining-mode-option__hint {
    margin-left: auto;
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid var(--mh-border);
    background: #fff;
    color: #8a93a3;
    font-size: 12px;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    cursor: help;
}

.woocommerce-cart .mh-mining-mode-option__desc {
    grid-column: 2;
    display: block;
    margin-top: 4px;
    color: var(--mh-text-muted);
    font-size: 0.86rem;
}

.woocommerce-cart .mh-mining-compare {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(250px, 0.9fr) minmax(0, 1fr);
    gap: 10px;
    font-size: 0.88rem;
}

.woocommerce-cart .mh-mining-compare__card,
.woocommerce-cart .mh-mining-compare__center {
    border: 1px solid #e8edf3;
    border-radius: 6px;
    background: #f9fbff;
    padding: 10px;
}

.woocommerce-cart .mh-mining-compare__card.is-active {
    border-color: #bfd9ff;
    background: #f3f8ff;
}

.woocommerce-cart .mh-mining-compare__title {
    color: var(--mh-primary);
    font-weight: 700;
    margin-bottom: 8px;
}

.woocommerce-cart .mh-mining-compare__card > div {
    margin-bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #eef2f7;
    color: var(--mh-primary);
    font-weight: 700;
}

.woocommerce-cart .mh-mining-compare__card > div:last-child {
    border-bottom: 0;
}

.woocommerce-cart .mh-mining-compare__card > div > strong {
    color: #6c7688;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.woocommerce-cart .mh-mining-compare__card > div > small {
    display: block;
    color: #8b94a3;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 2px;
}

.woocommerce-cart .mh-power-value {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-end;
    max-width: 100%;
}

.woocommerce-cart .mh-power-value__kwh {
    white-space: nowrap;
    font-size: 0.9rem;
    line-height: 1.1;
}

.woocommerce-cart .mh-power-value__w {
    display: block;
    white-space: nowrap;
    color: #8b94a3;
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.2;
    margin-top: 2px;
}

.woocommerce-cart .mh-mining-compare__selected {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #6c7688;
    font-size: 0.8rem;
    font-weight: 600;
}

.woocommerce-cart .mh-mining-compare__selected [data-role="selected-label"] {
    color: var(--mh-primary);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.woocommerce-cart .mh-mining-compare__center {
    display: block;
}

.woocommerce-cart .mh-mining-compare__net {
    background: #fff;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    padding: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.woocommerce-cart .mh-mining-compare__net strong {
    color: #6c7688;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.woocommerce-cart .mh-mining-compare__net [data-role="selected-net"] {
    color: var(--mh-primary);
    font-size: 0.97rem;
    font-weight: 700;
}

.woocommerce-cart .mh-mining-compare__net [data-role="selected-net"].is-positive {
    color: #2f7d42;
}

.woocommerce-cart .mh-mining-compare__net [data-role="selected-net"].is-negative {
    color: #9a4c4c;
}

.woocommerce-cart .mh-mining-compare__savings {
    color: #6c7688;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.woocommerce-cart .mh-mining-compare__savings strong {
    font-weight: 600;
    white-space: nowrap;
}

.woocommerce-cart .mh-mining-compare__savings .woocommerce-Price-amount {
    color: var(--mh-primary);
    font-size: 0.9rem;
    font-weight: 700;
    white-space: nowrap;
}

.woocommerce-cart .mh-mining-mode-note {
    margin: 10px 0 0;
    color: var(--mh-text-muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

/* Checkout summary of selected setup */
.woocommerce-checkout .mh-checkout-mode-summary {
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    background: #f8fbff;
    color: var(--mh-text);
    font-size: 0.9rem;
}

.woocommerce-checkout .mh-checkout-mode-summary strong {
    color: var(--mh-primary);
    margin-right: 6px;
}

/* Notices */
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error {
    border-radius: 6px;
    border: 1px solid var(--mh-border);
}

/* Make the custom Elementor promo section look intentional */
.woocommerce-cart .elementor-section.elementor-inner-section {
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius);
    background: var(--mh-surface-alt);
    padding: 12px;
    margin-bottom: 16px;
}

.woocommerce-cart .elementor-widget-text-editor h3 {
    color: var(--mh-primary);
    margin-bottom: 10px;
}

.woocommerce-cart .elementor-widget-text-editor p {
    color: var(--mh-text);
    line-height: 1.6;
}

.woocommerce-cart .elementor-widget-button .elementor-button {
    background: var(--mh-primary);
    border-radius: 6px;
    font-weight: 700;
}

.woocommerce-cart .elementor-widget-button .elementor-button:hover {
    background: var(--mh-accent);
}

/* Requested: remove extra margin from this cart Elementor section */
.woocommerce-cart .elementor-element-49b036a {
    margin: 0 !important;
}


/* =============================================================================
   Checkout page polish (same visual system as cart)
   ============================================================================= */

/* Error messages container - full width at top */
.woocommerce-checkout .mh-checkout-errors-top {
    grid-column: 1 / -1 !important;
    width: 100%;
    margin-bottom: 20px;
}

.woocommerce-checkout .mh-checkout-errors-top > div {
    background: #ffebee;
    border-left: 4px solid #d32f2f;
    padding: 10px 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    color: #c62828;
    font-weight: 500;
}

.woocommerce-checkout form.checkout {
    display: grid !important;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr) !important;
    gap: 18px;
    align-items: start;
}

.woocommerce-checkout form.checkout > *:not(#customer_details):not(#order_review_heading):not(#order_review) {
    grid-column: 1 / -1;
}

.woocommerce-checkout #customer_details,
.woocommerce-checkout #order_review_heading,
.woocommerce-checkout #order_review {
    background: var(--mh-surface);
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius);
    box-shadow: var(--mh-shadow-sm);
}

.woocommerce-checkout #customer_details {
    float: none !important;
    width: auto !important;
    clear: none !important;
    grid-column: 1;
    grid-row: 1 / span 2;
    padding: 16px;
}

.woocommerce-checkout #order_review_heading {
    float: none !important;
    width: auto !important;
    clear: none !important;
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    padding: 14px 16px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #ffffff !important;
    background: var(--mh-primary) !important;
    border-radius: 8px 8px 0 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-checkout #order_review {
    float: none !important;
    width: auto !important;
    clear: none !important;
    grid-column: 2;
    grid-row: 2;
    padding: 16px;
    border: 2px solid var(--mh-primary);
    background: #ffffff;
}

.woocommerce-checkout #order_review table.shop_table th {
    background: var(--mh-primary);
    color: #ffffff;
    font-weight: 700;
}

.woocommerce-checkout #order_review table.shop_table td {
    color: var(--mh-text);
    font-weight: 500;
}

.woocommerce-checkout .woocommerce-form-coupon-toggle .woocommerce-info,
.woocommerce-checkout form.checkout_coupon {
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    background: #fff;
    box-shadow: var(--mh-shadow-sm);
}

.woocommerce-checkout form.checkout_coupon {
    padding: 12px;
    margin: 10px 0 14px;
}

.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 {
    width: 100% !important;
    float: none !important;
}

.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3 {
    color: var(--mh-primary);
    margin: 0 0 14px;
    font-size: 1.05rem;
}

.woocommerce-checkout .form-row {
    margin-bottom: 12px;
}

.woocommerce-checkout .form-row label {
    color: var(--mh-primary);
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
}

.woocommerce-checkout input.input-text,
.woocommerce-checkout textarea,
.woocommerce-checkout select,
.woocommerce-checkout .select2-container .select2-selection--single {
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    min-height: 40px;
    background: #fff;
}

.woocommerce-checkout .select2-container .select2-selection--single {
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.woocommerce-checkout table.shop_table {
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    overflow: hidden;
}

.woocommerce-checkout table.shop_table {
    width: 100%;
}

.woocommerce-checkout table.shop_table th {
    background: var(--mh-primary);
    color: #ffffff;
    font-weight: 700;
    border-color: var(--mh-primary);
    padding: 10px 8px;
    text-align: left;
}

.woocommerce-checkout table.shop_table td {
    border-color: var(--mh-primary);
    padding: 10px 8px;
    font-weight: 500;
    color: var(--mh-text);
    background: #ffffff;
}

.woocommerce-checkout table.shop_table tbody tr:first-child td {
    color: var(--mh-text);
}

.woocommerce-checkout table.shop_table .product-name,
.woocommerce-checkout table.shop_table .product-total {
    color: var(--mh-text);
    font-weight: 600;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--mh-border);
}

.woocommerce-checkout .woocommerce-privacy-policy-text {
    background: transparent;
    padding: 0;
    border-radius: 0;
    margin-top: 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--mh-text-muted);
}

.woocommerce-checkout #payment {
    margin-top: 20px;
    border: 2px solid var(--mh-accent);
    border-radius: 8px;
    background: #fafbff;
    padding: 16px;
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid var(--mh-border);
    padding-bottom: 12px;
    margin: 0;
}

.woocommerce-checkout #payment ul.payment_methods li {
    margin-bottom: 0 !important;
}

.woocommerce-checkout #payment ul.payment_methods li label {
    font-weight: 700;
    color: var(--mh-primary);
    margin: 0;
}

.woocommerce-checkout #payment div.payment_box {
    background: #fff;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
    line-height: 1.6;
    font-size: 0.95rem;
    color: var(--mh-text);
}

/* Override WooCommerce core: remove grey background from payment form-row (Place order area) */
#add_payment_method #payment div.form-row,
.woocommerce-cart #payment div.form-row,
.woocommerce-checkout #payment div.form-row {
    background: transparent !important;
    padding: 16px 0 0;
}

/* Hide inline per-field error texts — errors are shown at top of form instead */
.woocommerce-checkout .woocommerce-input-wrapper .description,
.woocommerce-checkout .form-row .woocommerce-error,
.woocommerce-checkout .validate-required.woocommerce-invalid > label .optional,
.woocommerce-checkout span.woocommerce-input-wrapper + .description {
    display: none !important;
}

/* Hide inline field-level error message paragraphs rendered below each input */
.woocommerce-checkout .form-row p.woocommerce-invalid-required-field,
.woocommerce-checkout .checkout-inline-error-message {
    display: none !important;
}

.woocommerce-checkout #payment #place_order {
    width: 100%;
}

/* =============================================================================
   Thank you / order received page polish
   ============================================================================= */

body.woocommerce-order-received .woocommerce-order {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
}

body.woocommerce-order-received .woocommerce-notice--success.woocommerce-thankyou-order-received {
    margin: 0;
    padding: 14px 16px;
    border: 1px solid #cde9d6;
    border-left: 4px solid var(--mh-success);
    border-radius: var(--mh-radius);
    background: #effaf2;
    color: #1d6a33;
    font-size: 0.98rem;
    line-height: 1.5;
    box-shadow: var(--mh-shadow-sm);
}

body.woocommerce-order-received .woocommerce-order-overview.order_details {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    border: 0;
}

/* Parent themes often inject clearfix pseudo-elements on order_details.
   In grid layout they become extra (empty) grid items and create a ghost first card. */
body.woocommerce-order-received .woocommerce-order-overview.order_details::before,
body.woocommerce-order-received .woocommerce-order-overview.order_details::after {
    content: none !important;
    display: none !important;
}

body.woocommerce-order-received .woocommerce-order-overview.order_details li {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    float: none !important;
    width: auto !important;
    clear: none !important;
    margin: 0;
    padding: 12px;
    border: 1px solid #e2e6ea !important;
    border-radius: 6px;
    background: #ffffff !important;
    color: #6b7280;
    text-transform: none;
    font-size: 0.82rem;
    line-height: 1.35;
}

/* Nuclear override: first card (Order number) sometimes hidden by parent theme */
body.woocommerce-order-received .woocommerce-order-overview.order_details li.woocommerce-order-overview__order,
body.woocommerce-order-received .woocommerce-order-overview.order_details li:first-child {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #ffffff !important;
    border: 1px solid #e2e6ea !important;
    overflow: visible !important;
    height: auto !important;
    min-height: 0 !important;
    position: static !important;
    clip: auto !important;
    clip-path: none !important;
}

body.woocommerce-order-received .woocommerce-order-overview.order_details li strong {
    display: block;
    margin-top: 6px;
    color: var(--mh-primary);
    font-size: 0.98rem;
    font-weight: 700;
}

body.woocommerce-order-received .woocommerce-order-details,
body.woocommerce-order-received .woocommerce-customer-details {
    background: #fff;
    border: 1px solid var(--mh-border);
    border-radius: var(--mh-radius);
    box-shadow: var(--mh-shadow-sm);
    padding: 16px;
    margin: 0 !important;
}

body.woocommerce-order-received .woocommerce-order-details__title,
body.woocommerce-order-received .woocommerce-column__title {
    margin: 0 0 12px;
    color: var(--mh-primary);
    font-size: 1.06rem;
    font-weight: 700;
}

body.woocommerce-order-received .woocommerce-table--order-details.shop_table {
    width: 100%;
    border: 1px solid #e2e6ea;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

body.woocommerce-order-received .woocommerce-table--order-details.shop_table thead th {
    background: var(--mh-primary);
    color: #fff;
    border-color: var(--mh-primary);
    font-weight: 700;
    padding: 10px 8px;
    text-align: left;
}

body.woocommerce-order-received .woocommerce-table--order-details.shop_table td {
    border: 0;
    border-top: 1px solid #e2e6ea;
    color: #1a1a2e;
    background: #fff;
    padding: 10px 8px;
    font-weight: 500;
    vertical-align: middle;
}

body.woocommerce-order-received .woocommerce-table--order-details.shop_table thead th + th,
body.woocommerce-order-received .woocommerce-table--order-details.shop_table tbody td + td,
body.woocommerce-order-received .woocommerce-table--order-details.shop_table tfoot td {
    border-left: 1px solid #e2e6ea;
}

body.woocommerce-order-received .woocommerce-table--order-details.shop_table tfoot tr {
    border-top: 1px solid var(--mh-border);
}

body.woocommerce-order-received .woocommerce-table--order-details.shop_table tfoot th {
    background: var(--mh-surface-alt);
    color: var(--mh-text-muted);
    font-weight: 600;
    font-size: 0.88rem;
    padding: 9px 8px;
    text-align: left;
    width: 38%;
    border-color: var(--mh-border);
}

body.woocommerce-order-received .woocommerce-table--order-details.shop_table tfoot td {
    font-size: 0.9rem;
    padding: 9px 8px;
    background: #fff;
    color: var(--mh-text);
}

body.woocommerce-order-received .woocommerce-table--order-details.shop_table tfoot .order-total th,
body.woocommerce-order-received .woocommerce-table--order-details.shop_table tfoot .order-total td {
    font-weight: 700;
    color: var(--mh-primary);
    font-size: 0.98rem;
    border-top: 2px solid var(--mh-border);
}

body.woocommerce-order-received .woocommerce-table--order-details .product-name a {
    color: var(--mh-primary);
    font-weight: 600;
    text-decoration: none;
}

body.woocommerce-order-received .woocommerce-table--order-details .product-name a:hover {
    color: var(--mh-accent);
    text-decoration: underline;
}

body.woocommerce-order-received .woocommerce-customer-details address {
    margin: 0;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    background: #f8fbff;
    padding: 12px;
    color: var(--mh-text);
    line-height: 1.65;
}

body.woocommerce-order-received .woocommerce-customer-details--phone,
body.woocommerce-order-received .woocommerce-customer-details--email {
    margin: 8px 0 0;
    color: var(--mh-primary);
    font-weight: 600;
}

body.woocommerce-order-received .mh-thankyou-next-steps {
    margin-top: 14px;
    border: 1px solid var(--mh-border);
    border-radius: 6px;
    background: #f8fbff;
    padding: 14px;
}

body.woocommerce-order-received .mh-thankyou-next-steps h3 {
    margin: 0 0 8px;
    color: var(--mh-primary);
    font-size: 1rem;
    font-weight: 700;
}

body.woocommerce-order-received .mh-thankyou-next-steps ul {
    margin: 0;
    padding-left: 18px;
    color: var(--mh-text);
    font-size: 0.9rem;
    line-height: 1.5;
}

body.woocommerce-order-received .mh-thankyou-next-steps li {
    margin-bottom: 6px;
}

body.woocommerce-order-received .mh-thankyou-next-steps__actions {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

body.woocommerce-order-received .mh-thankyou-next-steps__actions .button {
    border-radius: 6px;
    font-weight: 700;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    background: var(--mh-primary);
    color: #fff;
    border: 0;
    text-decoration: none;
}

body.woocommerce-order-received .mh-thankyou-next-steps__actions .button.alt {
    background: #fff;
    color: var(--mh-primary);
    border: 1px solid var(--mh-border);
}

body.woocommerce-order-received .mh-thankyou-next-steps__actions .button:hover {
    background: var(--mh-accent);
    color: #fff;
}

body.woocommerce-order-received .mh-thankyou-next-steps__actions .button.alt:hover {
    border-color: var(--mh-accent);
}

@media screen and (max-width: 768px) {
    .woocommerce-cart .woocommerce-cart-form,
    .woocommerce-cart .cart-collaterals .cart_totals {
        padding: 12px;
    }

    .woocommerce-cart .cart-collaterals {
        justify-content: stretch;
    }

    .woocommerce-cart .cart-collaterals .cart_totals {
        max-width: none;
    }

    .woocommerce-cart .woocommerce-shipping-methods {
        grid-template-columns: 1fr;
    }

    .woocommerce-cart table.shop_table_responsive tr td {
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .woocommerce-cart .actions .coupon {
        width: 100%;
        margin-bottom: 10px;
    }

    .woocommerce-cart .actions .coupon .input-text {
        width: 100%;
        margin: 0 0 8px;
    }

    .woocommerce-cart .mh-mining-mode-options {
        grid-template-columns: 1fr;
    }

    .woocommerce-cart .mh-mining-compare {
        grid-template-columns: 1fr;
    }

    .woocommerce-checkout form.checkout {
        grid-template-columns: 1fr !important;
    }

    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        grid-column: auto;
        grid-row: auto;
    }

    .woocommerce-checkout #customer_details,
    .woocommerce-checkout #order_review_heading,
    .woocommerce-checkout #order_review {
        padding-left: 12px;
        padding-right: 12px;
    }

    body.woocommerce-order-received .woocommerce-order-overview.order_details {
        grid-template-columns: 1fr;
    }

    body.woocommerce-order-received .woocommerce-order-details,
    body.woocommerce-order-received .woocommerce-customer-details {
        padding: 12px;
    }

    body.woocommerce-order-received .mh-thankyou-next-steps__actions .button {
        width: 100%;
    }
}
