/**
* Theme Name: Agricoma Child
* Theme URI:  http://ninetheme.com/
* Description: This is a child theme of Agricoma.
* Author: <a href="http://ninetheme.com/about">Ninetheme</a>
* Author URI: http://ninetheme.com/about
* Template: agricoma
* Version: 1.0.9
* License: GNU General Public License version 3.0
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
* Tested up to: 6.5
* Requires PHP: 7.4
* Tags: custom-colors, custom-menu, editor-style, featured-images, post-formats, threaded-comments, translation-ready
* Text Domain: agricoma-child
* Copyright: ninetheme.com
*/

/*

Theme Name: Agricoma Child
Theme URI:  http://ninetheme.com/
Author: Ninetheme
Author URI: http://ninetheme.com/about
Description: This is a child theme of Agricoma.
Version: 1.0.0
License: GNU General Public License version 3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Tags: custom-colors, custom-menu, editor-style, featured-images, post-formats, threaded-comments, translation-ready
Text Domain: agricoma
Domain Path: /languages
Tested up to: 6.5
Requires PHP: 7.4
Copyright: ninetheme.com
*/

/* Custom Checkout Styles */

/* Remove previous incorrect rules */
/* 
.woocommerce-checkout .wc-gzd-dhl-preferred-delivery-options .form-row .button,
.woocommerce-checkout .wc-gzd-dhl-preferred-delivery-options .form-row .wc-gzd-dhl-preferred-option {
    margin-right: 8px !important;
    margin-bottom: 8px !important;
    display: inline-block !important;
    float: none !important;
}

.woocommerce-checkout .wc-gzd-dhl-preferred-delivery-options .form-row {
    display: flex !important;
    flex-wrap: wrap !important;
}

.woocommerce-checkout .wc-gzd-dhl-preferred-delivery-options .wc-gzd-dhl-preferred-option-description {
    margin-top: 5px !important;
    margin-bottom: 15px !important;
}
*/

/* Hide product tags */
.ninetheme-meta-wrapper.tagged_as {
    display: none !important;
}

/* Hide "Add to wishlist" button */
.ninetheme-product-button.ninetheme-wishlist-btn {
    display: none !important;
}

/* Increase height of "In den Warenkorb" button */
.single_add_to_cart_button.ninetheme-btn.ninetheme-btn-primary {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
    font-size: 16px !important;
}

/* Adjust height of quantity selector */
.quantity.type-number, .quantity.type-number input.qty {
    height: 52px !important;
}

/* Vertically align quantity buttons */
.quantity-button.minus, .quantity-button.plus {
    height: 100% !important;
}

/* Hide the stock number, keep only "vorrätig" visible */
p.stock.ninetheme-stock-status.in-stock {
    font-size: 0 !important; /* Hide the original text */
}

p.stock.ninetheme-stock-status.in-stock::after {
    content: "vorrätig";
    font-size: 14px !important; /* Restore original font size */
    visibility: visible;
}
/* DHL Wunschzustellung Styling */
.woocommerce-checkout ul.dhl-preferred-service-days {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    display: flex !important; /* Use flexbox for alignment */
    flex-wrap: wrap !important; /* Allow items to wrap */
    gap: 8px !important; /* Add spacing between items */
}

.woocommerce-checkout ul.dhl-preferred-service-days li {
    margin: 0 !important; /* Reset default list item margins */
    padding: 0 !important;
}

/* Style the labels which act as buttons */
.woocommerce-checkout ul.dhl-preferred-service-days li label {
    display: inline-block !important;
    padding: 5px 10px !important; /* Adjust padding as needed */
    border: 1px solid #ccc !important; /* Example border */
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.3s, border-color 0.3s !important;
}

/* Style for the selected option */
.woocommerce-checkout ul.dhl-preferred-service-days li input[type="radio"]:checked + label {
    background-color: #e0e0e0 !important; /* Example selected background */
    border-color: #adadad !important;
}

/* Hide the actual radio buttons */
.woocommerce-checkout ul.dhl-preferred-service-days li input[type="radio"] {
    display: none !important;
}

/* Adjust spacing for Ablageort/Nachbar radio options if they use similar structure */
.woocommerce-checkout .wc-gzd-dhl-preferred-option-description {
    margin-top: 5px !important;
    margin-bottom: 15px !important;
}

/* === Checkout UX Improvements (Attempt 5 - Cleaned) === */

/* 1. Move Checkboxes above Place Order & Style */
body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .wc-gzd-checkbox-placeholder {
    order: 10 !important;
    padding: 15px 0 5px 0 !important;
    border-top: 1px solid #e4dacb !important;
    margin-top: 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .wc-gzd-checkbox-placeholder label {
    font-size: 12px !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: flex-start !important;
    margin-bottom: 10px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .wc-gzd-checkbox-placeholder input[type="checkbox"] {
    margin-top: 3px !important;
    margin-right: 8px !important;
    flex-shrink: 0 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-sidebar .fc-checkout-order-review__inner .fc-place-order__section--main {
    order: 20 !important;
    margin-top: 10px !important;
    padding-top: 15px !important;
    border-top: 1px solid #e4dacb !important;
}

/* 3. Remove Zone Text */
body.woocommerce-checkout .woocommerce-NoticeGroup-updateOrderReview .woocommerce-message {
    display: none !important;
}

/* DHL Button Spacing */
body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li {
    margin: 0 !important;
    padding: 0 !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li label {
    display: inline-block !important;
    padding: 4px 8px !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background-color 0.3s, border-color 0.3s !important;
    font-size: 0.85em !important;
    line-height: 1.4 !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li input[type="radio"]:checked + label {
    background-color: #e0e0e0 !important;
    border-color: #adadad !important;
    font-weight: bold !important;
}

body.woocommerce-checkout #fc-wrapper ul.dhl-preferred-service-days li input[type="radio"] {
    display: none !important;
}

/* 2. Compact Completed Steps (Revised) */
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 10px 0 !important;
    border-bottom: 1px dashed #eee !important;
    margin-bottom: 10px !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-title {
    display: none !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text {
    padding: 0 !important;
    margin-right: 10px !important;
    flex-grow: 1;
    flex-basis: 0;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content {
    padding: 0 !important;
}
body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-text-content .fc-step__substep-text-line {
    font-size: 0.9em !important;
    line-height: 1.4 !important;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-edit {
    flex-shrink: 0 !important;
    font-size: 0.9em !important;
    white-space: nowrap;
    margin-left: 10px;
}

body.woocommerce-checkout #fc-wrapper .fc-checkout-step[data-step-complete] .fc-step__substep-save {
    display: none !important;
}


/* 4. Full Width Progress Bar (Revised) */
body.woocommerce-checkout form.woocommerce-checkout {
    position: relative;
}

body.woocommerce-checkout .fc-progress-bar.is-sticky--top {
    position: absolute !important;
    top: 0;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    z-index: 99;
    background-color: #fff;
    padding: 0 15px;
}

body.woocommerce-checkout .fc-progress-bar__inner {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

body.woocommerce-checkout .fc-checkout-steps {
    padding-top: 60px; /* Adjust height based on progress bar's actual height */
}