/**
 * Estilos base para elementos WooCommerce (Cart, Checkout, Order, Account)
 * Permite que los elementos se vean correctamente sin depender de Tailwind.
 *
 * Todo va dentro de @layer a propósito: el CSS en capa cede siempre ante el que
 * está fuera de capa, sea cual sea su especificidad. Así estos estilos hacen de
 * suelo —el elemento se ve bien recién insertado, sin Tailwind y sin tocar
 * nada— y encima pintan sin pelearse tanto los controles de estilo de Bricks
 * como las clases de utilidad o las clases globales. Las dos vías conviven.
 *
 * Todos los selectores son propios (flowtitude-*, ft-*): la capa no cede
 * terreno frente a WooCommerce ni al tema.
 *
 * @package Flowtitude
 * @subpackage WooCommerce
 * @since 1.0.6
 */

@layer flowtitude-elements {

/* --- Carrito: subtotal, total, envío --- */
.flowtitude-cart-subtotal,
.flowtitude-cart-order-total {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.flowtitude-cart-subtotal__label,
.flowtitude-cart-order-total__label {
    font-weight: 700;
}

.flowtitude-cart-subtotal__value,
.flowtitude-cart-order-total__value {
    flex: 1;
    min-width: 0;
    text-align: right;
}

.flowtitude-cart-subtotal__price,
.flowtitude-cart-order-total__price {
    display: flex;
    justify-content: flex-end;
    font-weight: 700;
}

.flowtitude-cart-order-total__tax {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
    text-align: right;
}

/* Row layout para order total (label + valor) */
.flowtitude-cart-order-total__row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

/* Price amount styling */
.flowtitude-price-amount {
    font-weight: 700;
    width: 100%;
    display: flex;
    justify-content: flex-end;
}

/* --- Carrito: envío --- */
.flowtitude-cart-shipping-totals__wrapper table {
    width: 100%;
}

.flowtitude-cart-shipping-totals__wrapper td {
    padding: 0.25rem 0;
}

/* --- Carrito: botón checkout y express --- */
.flowtitude-cart-proceed-checkout-container,
.flowtitude-cart-proceed-checkout-wrapper {
    width: 100%;
}

.flowtitude-cart-proceed-checkout__express {
    margin-bottom: 0.75rem;
}

.flowtitude-cart-proceed-checkout__express--below {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* --- Checkout: contenedores genéricos --- */
.flowtitude-checkout-submit-container,
.flowtitude-checkout-billing-detail,
.flowtitude-checkout-order-detail,
.flowtitude-checkout-shipping-methods-wrapper {
    width: 100%;
}

.flowtitude-checkout-order-total__value,
.flowtitude-checkout-order-total__price {
    text-align: right;
    font-weight: 700;
}

.flowtitude-checkout-order-total__tax {
    font-size: 0.875rem;
    color: #6b7280;
}

/* --- Order Summary: layouts --- */
.ft-order-summary--horizontal {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ft-order-summary--vertical {
    display: flex;
    flex-direction: column;
}

/* --- Simple Add to Cart: layouts --- */
.ft-add-to-cart--inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ft-add-to-cart--stacked {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* --- Desistimiento UE (botón + confirmación) --- */
.ft-withdrawal {
    margin-top: 1.5rem;
}

.ft-withdrawal__details > summary {
    list-style: none;
    display: inline-block;
    cursor: pointer;
}

.ft-withdrawal__details > summary::-webkit-details-marker {
    display: none;
}

.ft-withdrawal__confirm {
    margin-top: 0.75rem;
    padding: 1rem;
    border: 1px solid currentColor;
    border-radius: 6px;
    max-width: 560px;
}

.ft-withdrawal__deadline {
    font-weight: 600;
}

.ft-withdrawal__state {
    opacity: 0.75;
    font-size: 0.9em;
}

.ft-order-access__error {
    color: #b42318;
}

.ft-order-access__form input {
    max-width: 320px;
}

} /* @layer flowtitude-elements */
