/* 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: 30px !important;
    background-color: #f7d9d3 !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: 15px !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: 30px;
    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: 2 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: #888;
    margin-top: 2px;
    background: transparent;
}
.custom-checkout-overview .cco-qty {
    justify-content: center;
    font-size: 15px;
    color: #004243;
    background: transparent;
}
.custom-checkout-overview .cco-total {
    justify-content: flex-end;
    font-size: 15px;
    font-weight: 600;
    color: #004243;
    background: transparent;
}
.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: #888;
    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: #004243;
    color: #f7d9d3;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border: 1.5px solid #004243;
    transition: all 0.2s;
}
.custom-checkout-overview .cco-edit-btn:hover {
    background: #f7d9d3;
    color: #004243;
    border-color: #004243;
}
@media (max-width: 600px) {
    .custom-checkout-overview {
        max-width: 100%;
        border-radius: 18px;
        padding: 0 0 10px 0;
    }
    .custom-checkout-overview .cco-header,
    .custom-checkout-overview .cco-row,
    .custom-checkout-overview .cco-footer,
    .custom-checkout-overview .cco-edit-btn-row {
        padding-left: 0;
        padding-right: 0;
    }
    .custom-checkout-overview .cco-row {
        flex-direction: column;
        gap: 4px;
        padding: 10px 0;
    }
    .custom-checkout-overview .cco-col {
        justify-content: flex-start;
    }
    .custom-checkout-overview .cco-product {
        flex-direction: row;
        align-items: flex-start;
    }
    .custom-checkout-overview .cco-qty,
    .custom-checkout-overview .cco-total {
        font-size: 14px;
        margin-top: 2px;
    }
    .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;
    }
}
