/* Cart + Checkout: LPC line-item meta styling (Blocks) */

/* Classic PHP cart: LPC action bar below product name */
.woocommerce-cart-form .lpc-cart-actions-placeholder,
.woocommerce-cart-form .lpc-cart-actions-bar {
    margin-top: 0.75rem;
}

.woocommerce-cart-form .woocommerce-cart-item-data dt,
.woocommerce-cart-form .woocommerce-cart-item-data dd {
    font-size: 0.875rem;
}

.woocommerce-cart-form .woocommerce-cart-item-data .variation-Stückpreis,
.woocommerce-cart-form .woocommerce-cart-item-data .variation-Stueckpreis {
    font-weight: 600;
}

/* Hide default qty input for LPC lines — quantity is edited via modal */
.woocommerce-cart-form tr:has(.lpc-cart-actions-bar) .quantity,
.woocommerce-cart-form tr:has(.lpc-cart-actions-placeholder) .quantity {
    display: none !important;
}

/* Blocks cart */

/* Hide duplicate WC variation attrs — Konfiguration already lists them */
.wc-block-cart__main .wc-block-components-product-details__cup-size,
.wc-block-cart__main .wc-block-components-product-details__wall,
.wc-block-cart__main .wc-block-components-product-details__material,
.wc-block-checkout .wc-block-components-product-details__cup-size,
.wc-block-checkout .wc-block-components-product-details__wall,
.wc-block-checkout .wc-block-components-product-details__material {
    display: none !important;
}

/* Hide duplicate Design row on checkout — badge below shows the same info with link */
.wc-block-checkout .wc-block-components-product-details__design {
    display: none !important;
}

/* Native "Design" row in cart product details — subtle highlight */
.wc-block-cart__main .wc-block-components-product-details__design {
    display: block !important;
    margin-top: 0.45rem;
    padding: 0.45rem 0.6rem;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 8px;
    list-style: none;
}

.wc-block-cart__main .wc-block-components-product-details__design .wc-block-components-product-details__name,
.wc-block-cart__main .wc-block-components-product-details__design .wc-block-components-product-details__value {
    color: #166534;
    font-weight: 600;
    font-size: 0.82rem;
}

/* Hide broken default WC Blocks remove icon on LPC lines (use Entfernen button) */
.wc-block-cart-items__row:has(.lpc-cart-actions-bar) .wc-block-cart-item__remove-link,
.wc-block-cart-items__row:has(.lpc-cart-actions-placeholder) .wc-block-cart-item__remove-link {
    display: none !important;
}

/* Hide duplicate unit price under product title — Stückpreis is in LPC meta with full decimals */
.wc-block-cart-items__row:has(.lpc-cart-actions-bar) .wc-block-cart-item__prices,
.wc-block-cart-items__row:has(.lpc-cart-actions-placeholder) .wc-block-cart-item__prices,
.wc-block-cart-items__row:has(.lpc-cart-actions-bar) .wc-block-components-product-price,
.wc-block-cart-items__row:has(.lpc-cart-actions-placeholder) .wc-block-components-product-price {
    display: none !important;
}

/* Proceed to checkout: keep label white on hover (theme link color is green) */
.wc-block-cart .wc-block-components-button:not(.is-link),
.wc-block-cart .wc-block-cart__submit-button {
    color: #fff !important;
}

.wc-block-cart .wc-block-components-button:not(.is-link):hover,
.wc-block-cart .wc-block-components-button:not(.is-link):focus,
.wc-block-cart .wc-block-cart__submit-button:hover,
.wc-block-cart .wc-block-cart__submit-button:focus {
    color: #fff !important;
}

.wc-block-cart .wc-block-components-button:not(.is-link):hover .wc-block-components-button__text,
.wc-block-cart .wc-block-components-button:not(.is-link):focus .wc-block-components-button__text,
.wc-block-cart .wc-block-cart__submit-button:hover .wc-block-components-button__text,
.wc-block-cart .wc-block-cart__submit-button:focus .wc-block-components-button__text {
    color: #fff !important;
}

/* LPC-enhanced cart totals rows (match Blocks styling) */
.lpc-totals-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: 0.5rem 0;
    font-size: 0.95em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.lpc-totals-row__label {
    color: #50575e;
}

.lpc-totals-row__value {
    font-weight: 600;
    color: #1e1e1e;
    white-space: nowrap;
}

.lpc-totals-row--net .lpc-totals-row__value,
.lpc-totals-row--grand .lpc-totals-row__value {
    font-weight: 700;
}

.lpc-totals-row--shipping .lpc-totals-row__value {
    color: #166534;
    font-weight: 600;
}

/* ── Injected design status badge (checkout order summary) ── */
.lpc-design-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 0.82rem;
    line-height: 1.35;
}

.lpc-design-status--attached {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.lpc-design-status--missing {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.lpc-design-status__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.lpc-design-status--attached .lpc-design-status__icon {
    background: #22c55e;
    color: #fff;
}

.lpc-design-status--missing .lpc-design-status__icon {
    background: #f59e0b;
    color: #fff;
}

.lpc-design-status__label {
    font-weight: 700;
}

.lpc-design-status__files {
    flex: 1 1 100%;
    padding-left: 1.75rem;
    font-weight: 500;
    word-break: break-all;
}

.lpc-design-status__link {
    color: #15803d;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.lpc-design-status__link:hover {
    color: #14532d;
}

.lpc-design-status__hint {
    flex: 1 1 100%;
    padding-left: 1.75rem;
    font-size: 0.78rem;
    opacity: 0.9;
}

/* Delivery info in cart / checkout sidebar */
.wc-block-cart .wc-block-components-sidebar,
.wc-block-cart-order-summary-block,
.wc-block-checkout__order-summary,
.wp-block-woocommerce-checkout-order-summary-block {
    padding-left: 20px;
    padding-right: 20px;
    box-sizing: border-box;
}

.wc-block-cart .wc-block-components-totals-wrapper,
.wc-block-checkout .wc-block-components-totals-wrapper {
    padding-left: 2px;
    padding-right: 2px;
}

.wc-block-checkout .wc-block-checkout__order-summary .wc-block-components-order-summary-item {
    padding-left: 2px;
    padding-right: 2px;
}

.lpc-delivery-info-wrap {
    margin: 12px 0 16px;
}

.wc-block-cart__sidebar:has(.lpc-delivery-info-wrap) .lpc-totals-shipping,
.wc-block-checkout__order-summary:has(.lpc-delivery-info-wrap) .lpc-totals-shipping,
.wc-block-cart__sidebar:has(.lpc-delivery-info-wrap) .wc-block-components-totals-shipping,
.wc-block-checkout__order-summary:has(.lpc-delivery-info-wrap) .wc-block-components-totals-shipping {
    display: none !important;
}

.lpc-delivery-info--cart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
    border: 1px solid #bbf7d0;
    border-radius: 10px;
}

.lpc-delivery-info--cart .lpc-delivery-info__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.lpc-delivery-info--cart .lpc-delivery-info__label {
    font-size: 13px;
    font-weight: 600;
    color: #4b5563;
}

.lpc-delivery-info--cart .lpc-delivery-info__value {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    text-align: right;
}

.lpc-delivery-info--cart .lpc-delivery-info__value.is-free {
    color: #16a34a;
}

.lpc-delivery-info--cart .lpc-delivery-info__value--date {
    max-width: 62%;
    line-height: 1.35;
    color: #14532d;
}

.lpc-cart-delivery-info td {
    padding-top: 0 !important;
    border-top: 0 !important;
}
