/* Eingabefelder auf der Kassenseite anpassen */
.woocommerce-checkout input[type="text"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="email"],
.woocommerce-checkout select,
.woocommerce-checkout textarea {
    border: none !important;
    border-bottom: 1px solid #e0e0e0 !important;
    border-radius: 0 !important;
    padding: 10px 0 !important;
    background-color: transparent !important;
    transition: border-color 0.3s ease;
}

/* Fokus-Zustand der Eingabefelder */
.woocommerce-checkout input[type="text"]:focus,
.woocommerce-checkout input[type="tel"]:focus,
.woocommerce-checkout input[type="email"]:focus,
.woocommerce-checkout select:focus,
.woocommerce-checkout textarea:focus {
    border-bottom-color: var(--awb-color5) !important;
    outline: none !important;
}

/* Labels ausblenden */
.woocommerce-checkout .form-row label {
    display: none !important;
}

/* Ausnahme für Legal-Checkbox */
.woocommerce-checkout .form-row.checkbox-legal label {
    display: block !important;
}

/* Labels für required fields trotzdem anzeigen */
.woocommerce-checkout .form-row.validate-required label {
    /* display: none !important; */
}

/* Placeholder-Text stylen */
.woocommerce-checkout input::placeholder,
.woocommerce-checkout textarea::placeholder {
    opacity: 0.7;
}

/* Select-Felder anpassen */
.woocommerce-checkout .select2-container--default .select2-selection--single {
    border: none !important;
    border-bottom: 1px solid #e0e0e0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
}

/* Select2 Dropdown-Pfeil anpassen */
.woocommerce-checkout .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100% !important;
}

/* Abstand zwischen den Feldern */
.woocommerce-checkout .form-row {
    margin-bottom: 20px !important;
}

/* Germanized Edit Data Notice Styling */
.wc-gzd-edit-data-notice {
    display: none !important;
}

.wc-gzd-edit-data-notice p.wc-gzd-info {
    margin: 0 !important;
    padding: 0 !important;
}

/* Zahlungsbereich Styling */
.woocommerce-checkout-payment {
    border-radius: 5px !important;
    background-color: #2672CF33 !important;
    padding: 20px !important;
}

/* Radio Buttons im Zahlungsbereich */
.woocommerce-checkout-payment input[type="radio"] {
    accent-color: #004243 !important;
}

.woocommerce-checkout-payment input[type="radio"]:checked {
    background-color: #004243 !important;
    border-color: #004243 !important;
}

/* Zahlungsmethoden Liste */
.woocommerce-checkout-payment ul.payment_methods {
    padding: 0 !important;
    border: none !important;
}

.woocommerce-checkout-payment ul.payment_methods li {
    margin-bottom: 15px !important;
}

/* Payment Box */
.woocommerce-checkout-payment .payment_box {
    background-color: rgba(255, 255, 255, 0.5) !important;
    border-radius: 5px !important;
    margin: 10px 0 !important;
}

.woocommerce-checkout-payment .payment_box::before {
    display: none !important;
}

/* PayPal Zahlungsmethode und Radio-Button Styling */
.fusion-woo-checkout-payment-tb .woocommerce-checkout-payment ul.wc_payment_methods li > label {
    background-color: transparent !important;
    padding: 4px 20px !important;
    padding-left: 60px !important;
}

.fusion-woo-checkout-order-review-tb ul li > label:before, 
.fusion-woo-checkout-payment-tb ul li > label:before {
    border-color: #004243 !important;
}

.fusion-woo-checkout-order-review-tb ul li input:checked + label:after, 
.fusion-woo-checkout-payment-tb ul li input:checked + label:after {
    background: #004243 !important;
}

/* PayPal Gateway spezifisches Styling */
#payment_method_ppcp-gateway {
    background-color: transparent !important;
}

.payment_method_ppcp-gateway {
    background-color: transparent !important;
}

/* Bestellübersichtstabelle Styling */
.shop_table.woocommerce-checkout-review-order-table {
    background-color: transparent !important;
}

.shop_table.woocommerce-checkout-review-order-table thead,
.shop_table.woocommerce-checkout-review-order-table tbody,
.shop_table.woocommerce-checkout-review-order-table tfoot {
    background-color: transparent !important;
}

.shop_table.woocommerce-checkout-review-order-table th,
.shop_table.woocommerce-checkout-review-order-table td {
    background-color: transparent !important;
}


/* --- Custom Checkout Übersicht (Shortcode) --- */
.custom-checkout-overview {
    width: 100%;
    max-width: 700px;
    margin: 0 auto 40px auto;
    background: transparent;
    border-radius: 0px;
    box-shadow: none;
    padding: 0 0 20px 0;
    overflow: hidden;
    font-family: all-round-gothic, Arial, sans-serif;
}
.custom-checkout-overview .cco-header {
    background: transparent;
    font-weight: 700;
    color: #004243;
    padding: 20px 0 10px 0;
    font-size: 16px;
    border-radius: 30px 30px 0 0;
    display: flex;
    gap: 10px;
}
.custom-checkout-overview .cco-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1.5px solid #004243;
    background: transparent;
}
.custom-checkout-overview .cco-row:last-child {
    border-bottom: none;
}
.custom-checkout-overview .cco-col {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: flext-start;
    background: transparent;
}
.custom-checkout-overview .cco-product {
    flex: 3 1 0;
    min-width: 120px;
    gap: 12px;
    background: transparent;
}
.custom-checkout-overview .cco-thumb img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 16px;
    margin-right: 10px;
    background: #f7d9d3;
}
.custom-checkout-overview .cco-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: transparent;
}
.custom-checkout-overview .cco-title {
    font-weight: 700;
    color: #004243;
    font-size: 15px;
    text-decoration: none;
    background: transparent;
}
.custom-checkout-overview .cco-variation {
    font-size: 13px;
    color: #004243;
    margin-top: 2px;
    background: transparent;
}
.custom-checkout-overview .cco-qty {
    justify-content: center;
    font-size: 15px;
    color: #004243;
    background: transparent;
    flex: 0 0 30px;
    min-width: 30px;
}
.custom-checkout-overview .cco-total {
    justify-content: flex-end;
    font-size: 15px;
    font-weight: 600;
    color: #004243;
    background: transparent;
    flex: 0 0 50px;
    min-width: 50px;
}
.custom-checkout-overview .cco-footer {
    padding: 18px 0 0 0;
    background: transparent;
    border-radius: 0 0 30px 30px;
    margin-top: 10px;
}
.custom-checkout-overview .cco-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 15px;
    padding: 6px 0;
    color: #004243;
    background: transparent;
    border-bottom: 1.5px solid #004243;
}
.custom-checkout-overview .cco-summary-row:last-child {
    border-bottom: none;
}
.custom-checkout-overview .cco-total-row {
    font-size: 18px;
    font-weight: 700;
    border-bottom: none;
}
.custom-checkout-overview .cco-tax-row {
    font-size: 13px;
    color: #004243;
    margin-top: 2px;
    background: transparent;
    border-bottom: none;
}
.custom-checkout-overview .cco-edit-btn-row {
    display: flex;
    justify-content: flex-end;
    padding: 18px 0 0 0;
    background: transparent;
}
.custom-checkout-overview .cco-edit-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #2672cf;
    color: white;
    border-radius: 5px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: 3px solid #2672cf;
    transition: all 0.2s;
}
.custom-checkout-overview .cco-edit-btn:hover {
    background: transparent;
    color: #2672cf;
    border-color: #2672cf;
}



@media (max-width: 600px) {
    .custom-checkout-overview {
        max-width: 100%;
        border-radius: 18px;
        padding: 0 0 10px 0;
    }
    
    /* Hide header on mobile */
    .custom-checkout-overview .cco-header {
        display: none !important;
    }
    
    .custom-checkout-overview .cco-row,
    .custom-checkout-overview .cco-footer,
    .custom-checkout-overview .cco-edit-btn-row {
        padding-left: 0;
        padding-right: 0;
    }
    /* Mobile: Product info in column, qty and total on same line below */
    .custom-checkout-overview .cco-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0;
        padding: 15px 0;
    }
    
    .custom-checkout-overview .cco-col {
        justify-content: flex-start;
    }
    
    .custom-checkout-overview .cco-product {
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
        order: 1;
        padding-bottom: 15px;
        border-bottom: 1px solid #e0e0e0;
        margin-bottom: 15px;
        flex-basis: 100%;
    }
    
    /* Quantity and total on same line, below product line */
    .custom-checkout-overview .cco-qty {
        order: 2;
        flex: 0 0 auto;
        font-size: 14px;
        justify-content: flex-start;
        min-width: auto;
    }
    
    .custom-checkout-overview .cco-total {
        order: 3;
        flex: 1 1 auto;
        font-size: 14px;
        justify-content: flex-end;
        min-width: auto;
        margin-left: auto;
    }
    
    .custom-checkout-overview .cco-summary-row {
        font-size: 14px;
    }
    .custom-checkout-overview .cco-total-row {
        font-size: 16px;
    }
}

/* DHL Preferred Location Styling */
.dhl-preferred-location-types {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.dhl-preferred-location-types li {
    margin-bottom: 15px;
    position: relative;
    padding-left: 60px;
}

.dhl-preferred-location-types input[type="radio"] {
    display: none;
}

.dhl-preferred-location-types label {
    display: inline-block;
    position: relative;
    padding: 4px 20px;
    padding-left: 0px;
    cursor: pointer;
    font-family: all-round-gothic, Arial, sans-serif;
    color: #004243;
    font-weight: 500;
}

.dhl-preferred-location-types label:before {
    content: '' !important;
    position: absolute !important;
    left: -35px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 22px !important;
    height: 22px !important;
    border: 2px solid #004243 !important;
    border-radius: 50% !important;
    background-color: transparent !important;
    transition: all 0.2s ease !important;
}

.dhl-preferred-location-types input[type="radio"]:checked + label:after {
    content: '' !important;
    position: absolute !important;
    left: -27px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 10px !important;
    height: 10px !important;
    border-radius: 50% !important;
    background: #004243 !important;
}

.dhl-preferred-location-types input[type="radio"]:checked + label:before {
    border-color: #004243 !important;
}

.dhl-preferred-location-types label:hover:before {
    border-color: #004243 !important;
    background-color: rgba(0, 66, 67, 0.05) !important;
}

/* Checkout Bereich Reihenfolge */
.fusion-woo-checkout-payment-tb {
    display: flex;
    flex-direction: column;
}

.fusion-woo-checkout-payment-tb h3#order_payment_heading {
    order: 1;
}

.dhl-preferred-service-content {
    order: 2;
}

.wc-gzd-checkbox-placeholder-legal {
    order: 3;
}

.woocommerce-checkout-payment {
    order: 4;
}

.ppcp-messages {
    order: 5;
}

/* Abstände zwischen den Elementen */
.fusion-woo-checkout-payment-tb > * {
    margin-bottom: 25px;
}

.fusion-woo-checkout-payment-tb > *:last-child {
    margin-bottom: 0;
}

/* Mobile Ansicht - Reihenfolge der Hauptbereiche */
@media (max-width: 767px) {
    .woocommerce-checkout {
        display: flex;
        flex-direction: column;
    }

    #deine-bestellung {
        order: 1;
    }

    #kasse-form {
        order: 2;
    }
}


.wc-gzd-checkbox-placeholder input[type="checkbox"] {
    height: 24px !important;
    width: 24px !important;
}

.wc-gzd-checkbox-placeholder input[type="checkbox"]:checked {
    background-color: #004243 !important;
    border-color: #004243 !important;
}

.wc-gzd-checkbox-placeholder input[type="checkbox"]:checked:before {
    background-color: #004243 !important;
}

.validate-required.woocommerce-invalid .select2-selection--single, .validate-required.woocommerce-invalid input {
        box-shadow-color: white !important;
        outline: 2px solid red;
        outline-offset: 2px;
}

.wc-proceed-to-checkout {
    flex-wrap: wrap !important;
}

.wc-ppcp-cart-payments__container below {
    width: 100% !important;
}

/* Mobile Cart Styling */
@media only screen and (max-width: 800px) {
    .avada-coupon-fields {
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    /* Cart Item Styling */
    .woocommerce-cart-form__cart-item.cart_item {
        border-top: 1px solid #e0e0e0 !important;
        border-bottom: none !important;
        padding: 20px 0 !important;
    }
    
    .woocommerce-cart-form__cart-item.cart_item:first-child {
        border-top: none !important;
    }
    
    .woocommerce-cart-form__cart-item.cart_item:last-child {
        border-top: 1px solid #e0e0e0 !important;
        border-bottom: 1px solid #e0e0e0 !important;
    }
    
    /* Product Name Cell - Main Layout */
    .woocommerce-cart-form__cart-item .product-name {
        display: block !important;
        width: 100% !important;
        padding: 0 !important;
        margin-bottom: 15px !important;
    }
    
    .fusion-product-name-wrapper {
        display: flex !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    
    /* Thumbnail on the left */
    .fusion-product-name-wrapper .product-thumbnail {
        flex-shrink: 0 !important;
        width: 80px !important;
    }
    
    .fusion-product-name-wrapper .product-thumbnail img {
        width: 80px !important;
        height: 80px !important;
        border-radius: 8px !important;
    }
    
    /* Product info on the right */
    .fusion-product-name-wrapper .product-info {
        flex: 1 !important;
        min-width: 0 !important;
        margin-top: 0 !important;
        text-align: left !important;
    }
    
    /* Product title styling */
    .fusion-product-name-wrapper .product-title {
        font-size: 20px !important;
        font-family: "Futura PT Bold", Arial, sans-serif !important;
        font-weight: bold !important;
        color: #2672cf !important;
        text-decoration: none !important;
        display: block !important;
        margin-bottom: 8px !important;
        line-height: 1.2 !important;
        text-align: left !important;
    }
    
    /* Additional product info */
    .woocommerce-cart-form__cart-item .wc-gzd-cart-info {
        font-size: 14px !important;
        color: #666 !important;
        margin: 4px 0 !important;
        text-align: left !important;
    }
    
    /* Quantity, Price, and Subtotal in one row */
    .woocommerce-cart-form__cart-item .product-quantity,
    .woocommerce-cart-form__cart-item .product-price,
    .woocommerce-cart-form__cart-item .product-subtotal {
        display: inline-block !important;
        width: auto !important;
        padding: 0 !important;
        margin-right: 20px !important;
        vertical-align: top !important;
    }
    
    .woocommerce-cart-form__cart-item .product-quantity {
        font-weight: bold !important;
    }
    
    .woocommerce-cart-form__cart-item .product-price,
    .woocommerce-cart-form__cart-item .product-subtotal {
        font-size: 16px !important;
        font-weight: 600 !important;
    }
    
    /* Product price content in row direction */
    .woocommerce-cart-form__cart-item .product-price {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 5px !important;
        flex-wrap: wrap !important;
    }
    
    .woocommerce-cart-form__cart-item .product-price .woocommerce-Price-amount,
    .woocommerce-cart-form__cart-item .product-price .wc-gzd-cart-info {
        display: inline-block !important;
        margin: 0 !important;
        white-space: nowrap !important;
    }
    
    .woocommerce-cart-form__cart-item .product-price .wc-gzd-cart-info.unit-price {
        margin-left: 10px !important;
    }
    
    /* Hide remove button on mobile or position it better */
    .woocommerce-cart-form__cart-item .product-remove {
        position: absolute !important;
        top: 20px !important;
        right: 0 !important;
        width: auto !important;
        padding: 0 !important;
    }
    
    .woocommerce-cart-form__cart-item .product-remove .remove {
        font-size: 24px !important;
        color: #999 !important;
        text-decoration: none !important;
        padding: 5px !important;
    }
    
    /* Make cart item container relative for absolute positioning */
    .woocommerce-cart-form__cart-item {
        position: relative !important;
    }
    
    /* Data labels for mobile */
    .woocommerce-cart-form__cart-item .product-quantity:before {
        content: "Anzahl: " !important;
        font-weight: normal !important;
        color: #666 !important;
    }
    
    .woocommerce-cart-form__cart-item .product-price:before {
        content: "Preis: " !important;
        font-weight: normal !important;
        color: #666 !important;
    }
    
    .woocommerce-cart-form__cart-item .product-subtotal:before {
        content: "Gesamt: " !important;
        font-weight: normal !important;
        color: #666 !important;
    }

    .shop_table_responsive.woocommerce-cart-form__contents .product-remove a {
        transform: translate(-80%, -70%) !important;
    }

    .div.fusion-woo-cart-totals-wrapper ul#shipping_method li label {
        padding: none !important;
    }

    .wc-proceed-to-checkout {
        display: flex;
        flex-direction: column !important;
    }

    .wc-proceed-to-checkout a {
       margin-left: 0px !important;
    }

    .payment_method_stripe_cc { 
        display: flex;
        flex-direction: column;
        align-content: flex-start;
        align-items: flex-start;
    }
}

