/**
 * ComprarOnline - Cart CRO & Trust Elements
 * High-conversion enhancements for WooCommerce Cart Block
 */

/* ==========================================================================
   Micro-Trust Badges (Debajo de 'Finalizar compra')
   ========================================================================== */
.co-cart-trust-box {
    margin-top: 18px;
    margin-bottom: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.co-trust-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.co-trust-icon {
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.co-trust-icon svg {
    display: block;
}

.co-trust-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.35;
}

.co-trust-text strong {
    font-size: 13px;
    color: #0f172a;
    font-weight: 700;
}

.co-trust-text span {
    font-size: 11.5px;
    color: #64748b;
}

/* ==========================================================================
   Insignia de Claridad de Envío Blue Express
   ========================================================================== */
.co-cart-shipping-notice {
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 9px 12px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #1e40af;
    line-height: 1.4;
    box-sizing: border-box;
}

.co-cart-shipping-notice svg {
    flex-shrink: 0;
}

/* ==========================================================================
   Sticky Checkout Bar (Mobile Only)
   ========================================================================== */
.co-sticky-cart-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #e2e8f0;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.1);
    box-sizing: border-box;
    transform: translateY(110%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
    opacity: 0;
    pointer-events: none;
}

.co-sticky-cart-bar.co-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.co-sticky-cart-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.co-sticky-label {
    font-size: 10.5px;
    color: #64748b;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.co-sticky-amount {
    font-size: 17px;
    color: #0f172a;
    font-weight: 800;
    white-space: nowrap;
}

.co-sticky-btn {
    background: #0073aa;
    color: #ffffff !important;
    font-size: 13.5px;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.co-sticky-btn:hover,
.co-sticky-btn:active {
    background: #005a87;
    color: #ffffff !important;
    transform: translateY(-1px);
}

.co-sticky-btn svg {
    flex-shrink: 0;
}

/* Ocultar barra sticky en tablet y desktop */
@media (min-width: 922px) {
    .co-sticky-cart-bar {
        display: none !important;
    }
}

/* ==========================================================================
   Checkout CTA Button Styling & High-Contrast WCAG Fix
   ========================================================================== */
.wc-block-cart__submit-button,
a.wc-block-cart__submit-button,
.wc-block-components-button.contained,
a.wc-block-components-button.contained {
    background-color: #0284c7 !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border-radius: 12px !important;
    padding: 14px 24px !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.35) !important;
    transition: all 0.2s ease !important;
}

.wc-block-cart__submit-button:hover,
a.wc-block-cart__submit-button:hover,
.wc-block-components-button.contained:hover,
a.wc-block-components-button.contained:hover {
    background-color: #0369a1 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 20px rgba(2, 132, 199, 0.45) !important;
    transform: translateY(-1px) !important;
}

