/* RTX Central Import Pro - Frontend Styles */
/* All styles are scoped to WooCommerce pages only to avoid affecting the rest of the site */

/* Checkout custom fields styling */
.woocommerce tr.rtx-checkout-field td,
.woocommerce-page tr.rtx-checkout-field td {
    text-align: left !important;
}

.woocommerce tr.rtx-checkout-field ul,
.woocommerce-page tr.rtx-checkout-field ul {
    padding: 0;
    margin: 0;
    list-style: none;
}

.woocommerce tr.rtx-checkout-field li,
.woocommerce-page tr.rtx-checkout-field li {
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.woocommerce tr.rtx-checkout-field li:last-child,
.woocommerce-page tr.rtx-checkout-field li:last-child {
    border-bottom: none;
}

.woocommerce tr.rtx-checkout-field li:hover,
.woocommerce-page tr.rtx-checkout-field li:hover {
    background-color: #f8f9fa;
    padding-left: 10px;
}

.woocommerce tr.rtx-checkout-field td,
.woocommerce-page tr.rtx-checkout-field td {
    width: 100%;
}

.woocommerce tr.rtx-checkout-field label,
.woocommerce-page tr.rtx-checkout-field label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.woocommerce tr.rtx-checkout-field input[type="checkbox"],
.woocommerce-page tr.rtx-checkout-field input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.1);
}

.woocommerce tr.rtx-checkout-field input[type="checkbox"]:checked + label,
.woocommerce-page tr.rtx-checkout-field input[type="checkbox"]:checked + label {
    color: #2271b1;
}

/* Enhanced cart styles */
.woocommerce .upsell td.action-button a.button,
.woocommerce-page .upsell td.action-button a.button {
    background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0NDggNTEyIj48cGF0aCBkPSJNMjU2IDgwYzAtMTcuNy0xNC4zLTMyLTMyLTMycy0zMiAxNC4zLTMyIDMydjE0NEg0OGMtMTcuNyAwLTMyIDE0LjMtMzIgMzJzMTQuMyAzMiAzMiAzMmgxNDR2MTQ0YzAgMTcuNyAxNC4zIDMyIDMyIDMyczMyLTE0LjMgMzItMzJWMjg4aDE0NGMxNy43IDAgMzItMTQuMyAzMi0zMnMtMTQuMy0zMi0zMi0zMkgyNTZ6Ii8+PC9zdmc+);
    width: 50px;
    height: 50px;
    border-radius: 8px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px;
    background-color: #fed700 !important;
    border: none;
    float: right;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.woocommerce .upsell td.action-button a.button:hover,
.woocommerce-page .upsell td.action-button a.button:hover {
    background-color: #e6c200 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.woocommerce td.product-thumbnail.upsell-product-thumbnail img,
.woocommerce-page td.product-thumbnail.upsell-product-thumbnail img {
    width: 60px !important;
    height: auto !important;
    float: right;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.woocommerce td.product-thumbnail.upsell-product-thumbnail img:hover,
.woocommerce-page td.product-thumbnail.upsell-product-thumbnail img:hover {
    transform: scale(1.05);
}

.woocommerce tr.woocommerce-cart-form__cart-item.cart_item.upsell .product-name,
.woocommerce-page tr.woocommerce-cart-form__cart-item.cart_item.upsell .product-name {
    font-size: 14px;
    font-weight: 500;
}

.woocommerce tr.woocommerce-cart-form__cart-item.cart_item.upsell,
.woocommerce-page tr.woocommerce-cart-form__cart-item.cart_item.upsell {
    background: linear-gradient(135deg, #fff9e6, #ffffff);
    border-left: 4px solid #fed700;
    transition: all 0.3s ease;
}

.woocommerce tr.woocommerce-cart-form__cart-item.cart_item.upsell:hover,
.woocommerce-page tr.woocommerce-cart-form__cart-item.cart_item.upsell:hover {
    background: linear-gradient(135deg, #fff3d3, #fffef7);
    transform: translateX(2px);
}

/* Free delivery table enhancements */
.woocommerce table.free-delevery-table,
.woocommerce-page table.free-delevery-table {
    margin-top: 25px;
    width: 100%;
    border-collapse: collapse;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.woocommerce table.free-delevery-table thead,
.woocommerce-page table.free-delevery-table thead {
    background: linear-gradient(135deg, #2271b1, #135e96);
}

.woocommerce table.free-delevery-table thead th,
.woocommerce-page table.free-delevery-table thead th {
    text-align: center;
    color: white;
    font-weight: 600;
    padding: 20px;
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce table.free-delevery-table td,
.woocommerce-page table.free-delevery-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.woocommerce table.free-delevery-table tbody tr:hover,
.woocommerce-page table.free-delevery-table tbody tr:hover {
    background-color: #f8f9fa;
    transform: translateX(2px);
}

.woocommerce table.free-delevery-table tbody tr:last-child td,
.woocommerce-page table.free-delevery-table tbody tr:last-child td {
    border-bottom: none;
}

.woocommerce table.free-delevery-table td:first-child,
.woocommerce-page table.free-delevery-table td:first-child {
    font-weight: 600;
    color: #00a32a;
}

.woocommerce table.free-delevery-table td:last-child,
.woocommerce-page table.free-delevery-table td:last-child {
    font-weight: 600;
    color: #00a32a;
    text-align: center;
}

/* Popup notification styles */
#added-to-cart-popup {
    position: fixed;
    bottom: -100px;
    right: 20px;
    padding: 15px 25px;
    background: linear-gradient(135deg, #4caf50, #45a049);
    color: white;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    gap: 10px;
}

#added-to-cart-popup::before {
    content: '✓';
    font-size: 1.2em;
    font-weight: bold;
}

#added-to-cart-popup.show {
    bottom: 20px;
}

/* Enhanced form animations - scoped to WooCommerce */
.woocommerce .quantity input[type="number"],
.woocommerce-page .quantity input[type="number"] {
    border-radius: 6px;
    border: 2px solid #ddd;
    transition: all 0.3s ease;
    padding: 8px 12px;
}

.woocommerce .quantity input[type="number"]:focus,
.woocommerce-page .quantity input[type="number"]:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
    outline: none;
}

/* Checkout enhancements - scoped to WooCommerce checkout */
.woocommerce-checkout .woocommerce-input-wrapper {
    position: relative;
}

.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout select {
    border-radius: 6px;
    border: 2px solid #ddd;
    padding: 12px 15px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.woocommerce-checkout input[type="text"]:focus,
.woocommerce-checkout input[type="email"]:focus,
.woocommerce-checkout input[type="tel"]:focus,
.woocommerce-checkout select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
    outline: none;
}

/* Loading states */
.woocommerce .rtx-loading,
.woocommerce-page .rtx-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #666;
    font-style: italic;
}

.woocommerce .rtx-loading::after,
.woocommerce-page .rtx-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive design */
@media only screen and (max-width: 575.98px) {
    .woocommerce td.rtx-empty-tag,
    .woocommerce-page td.rtx-empty-tag {
        display: none !important;
    }

    .woocommerce td.action-button a,
    .woocommerce td.action-button:before,
    .woocommerce-page td.action-button a,
    .woocommerce-page td.action-button:before {
        float: none !important;
        display: block;
    }

    .woocommerce table.shop_table.shop_table_responsive tr td.action-button,
    .woocommerce-page table.shop_table.shop_table_responsive tr td.action-button {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
    }
    
    .woocommerce tr.woocommerce-cart-form__cart-item.cart_item.upsell,
    .woocommerce-page tr.woocommerce-cart-form__cart-item.cart_item.upsell {
        padding-left: 15px !important;
        border-left: 4px solid #fed700;
        margin-left: 15px;
        margin-bottom: 10px;
        border-radius: 0 8px 8px 0;
    }
    
    .woocommerce table.free-delevery-table,
    .woocommerce-page table.free-delevery-table {
        font-size: 14px;
    }
    
    .woocommerce table.free-delevery-table td,
    .woocommerce-page table.free-delevery-table td {
        padding: 12px 15px;
    }
    
    #added-to-cart-popup {
        right: 10px;
        left: 10px;
        text-align: center;
    }
}

@media only screen and (max-width: 480px) {
    .woocommerce table.free-delevery-table,
    .woocommerce-page table.free-delevery-table {
        font-size: 12px;
    }
    
    .woocommerce table.free-delevery-table td,
    .woocommerce-page table.free-delevery-table td {
        padding: 10px 12px;
    }
    
    .woocommerce tr.rtx-checkout-field li,
    .woocommerce-page tr.rtx-checkout-field li {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}
