/**
 * CSS fixes for shipping discount display
 */

/* Free shipping highlight */
.free-shipping {
    color: #00a32a !important;
    font-weight: bold !important;
    background: linear-gradient(135deg, #e8f5e8, #f0f8f0);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #00a32a;
}

/* Shipping discount notice */
.hozi-discount-notice {
    background: #f0f8ff;
    border: 1px solid #007cba;
    border-radius: 6px;
    padding: 15px;
    margin: 10px 0;
}

.hozi-discount-notice h4 {
    color: #007cba;
    margin: 0 0 10px 0;
    font-size: 1.1em;
}

.hozi-discount-notice ul {
    margin: 0;
    padding-right: 20px;
}

.hozi-discount-notice li {
    margin-bottom: 5px;
    color: #333;
}

/* Order review table fixes */
.woocommerce-checkout-review-order-table .shipping .amount,
.woocommerce-checkout-review-order-table .woocommerce-shipping-totals .amount {
    font-weight: bold;
}

/* Free shipping in order total */
.woocommerce-checkout-review-order-table .order-total .free-shipping,
.woocommerce-checkout-review-order-table .woocommerce-order-total .free-shipping {
    font-size: 1.1em;
}

/* Hanout theme specific fixes */
#codplugin_d_free {
    color: #00a32a !important;
    font-weight: bold !important;
}

#hozi-hanout-shipping-result {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Debug info styling */
.hozi-debug-info {
    background: #f9f9f9;
    border: 1px solid #ddd;
    padding: 10px;
    margin: 10px 0;
    font-family: monospace;
    font-size: 12px;
    border-radius: 4px;
}

/* Checkout total fixes */
.woocommerce-checkout-review-order-table tfoot tr:last-child td {
    font-weight: bold;
    font-size: 1.2em;
}

/* Ensure shipping cost updates are visible */
.shipping-cost-updating {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.shipping-cost-updated {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Mobile responsive fixes */
@media (max-width: 768px) {
    .hozi-discount-notice {
        padding: 10px;
        font-size: 0.9em;
    }
    
    .free-shipping {
        font-size: 0.9em;
        padding: 1px 6px;
    }
}

/* RTL support */
[dir="rtl"] .hozi-discount-notice ul {
    padding-right: 0;
    padding-left: 20px;
}

[dir="rtl"] .free-shipping {
    text-align: right;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .free-shipping {
        background: #ffffff;
        color: #000000 !important;
        border: 2px solid #000000;
    }
    
    .hozi-discount-notice {
        background: #ffffff;
        border: 2px solid #000000;
        color: #000000;
    }
}