/* =========================================================
   AIG – Buchungsübersicht und dezentes Gutscheinfeld
   ========================================================= */

/* Buchungsübersicht als zusammenhängender Kasten. */
body.single-wpfunnel_steps #order_review_heading {
    margin-bottom: 0 !important;
    border-radius: 10px 10px 0 0 !important;
}

body.single-wpfunnel_steps
#order_review
.woocommerce-checkout-review-order-table {
    margin-top: 0 !important;
    border: 1px solid #e5e8f3 !important;
    border-top: 0 !important;
    border-radius: 0 0 10px 10px !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: hidden;
}

body.single-wpfunnel_steps
.woocommerce-checkout-review-order-table
thead:first-child tr:first-child th:first-child,
body.single-wpfunnel_steps
.woocommerce-checkout-review-order-table
thead:first-child tr:first-child th:last-child,
body.single-wpfunnel_steps
.woocommerce-checkout-review-order-table
tbody:first-child tr:first-child td:first-child,
body.single-wpfunnel_steps
.woocommerce-checkout-review-order-table
tbody:first-child tr:first-child td:last-child {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
}

/* Gutscheinzeile mit denselben Innenabständen wie die Bestellzeilen. */
body.single-wpfunnel_steps
.woocommerce-checkout-review-order-table
tr.aig-checkout-coupon-row {
    background: transparent !important;
}

body.single-wpfunnel_steps
.woocommerce-checkout-review-order-table
tr.aig-checkout-coupon-row > td {
    width: 100% !important;
    padding: 14px 12px !important;
    box-sizing: border-box !important;
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid #e7ebed !important;
    text-align: left !important;
}

/* Aufklappbarer Bereich. */
body.single-wpfunnel_steps #aig-checkout-coupon {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #66727c;
    text-align: left;
}

/* Dezenter Schalter. */
body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-toggle {
    display: inline-flex;
    align-items: center;
    width: auto !important;
    max-width: 100%;
    margin: 0;
    padding: 0;
    background: transparent !important;
    color: #77828b;
    border: 0 !important;
    border-radius: 0 !important;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: none !important;
    outline: none;
    list-style: none;
    transition: color 0.2s ease;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-toggle::-webkit-details-marker {
    display: none;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-toggle::marker {
    content: "";
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-toggle::after {
    content: "";
    width: 0;
    height: 0;
    margin-left: 7px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #929ca3;
    transform: rotate(0deg);
    transform-origin: center;
    transition: transform 0.2s ease, border-top-color 0.2s ease;
}

body.single-wpfunnel_steps
#aig-checkout-coupon[open]
.aig-coupon-toggle::after {
    transform: rotate(180deg);
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-toggle:hover {
    color: #4f5f6b;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-toggle:hover::after {
    border-top-color: #4f5f6b;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-toggle:focus {
    outline: none;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-toggle:focus-visible {
    outline: 2px solid #77828b;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Ausgeklappter Inhalt. */
body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding-top: 11px;
    box-sizing: border-box;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-checkout-coupon-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    max-width: none;
    gap: 8px;
    box-sizing: border-box;
}

/* Eingabefeld. */
body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-input {
    width: 100%;
    min-width: 0;
    height: 40px;
    margin: 0 !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #344454 !important;
    border: 1px solid #dce2e5 !important;
    border-radius: 6px !important;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 38px;
    box-shadow: none !important;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-input::placeholder {
    color: #98a1a8;
    opacity: 1;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-input:focus {
    border-color: #8b979f !important;
    box-shadow: 0 0 0 2px rgba(62, 82, 105, 0.07) !important;
}

/* Anwenden-Button. */
body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-button {
    width: auto !important;
    min-width: 0;
    height: 40px;
    margin: 0 !important;
    padding: 0 14px !important;
    box-sizing: border-box !important;
    background: #fff !important;
    color: #66727c !important;
    border: 1px solid #cfd7db !important;
    border-radius: 6px !important;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 38px !important;
    text-align: center;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: none !important;
    outline: none;
    transition: background-color 0.2s ease, border-color 0.2s ease,
        color 0.2s ease, opacity 0.2s ease;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-button:hover {
    background: #f5f7f8 !important;
    color: #3e5269 !important;
    border-color: #aeb9bf !important;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-button:focus {
    outline: none !important;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-button:focus-visible {
    outline: 2px solid #6f7e89 !important;
    outline-offset: 2px;
}

body.single-wpfunnel_steps
#aig-checkout-coupon
.aig-coupon-button:disabled {
    cursor: wait;
    background: #f5f7f8 !important;
    opacity: 0.6;
}

/* Rückmeldungen. */
body.single-wpfunnel_steps #aig-coupon-response {
    display: none;
    width: 100%;
    margin: 8px 0 0;
}

body.single-wpfunnel_steps #aig-coupon-response:not(:empty) {
    display: block;
}

body.single-wpfunnel_steps
#aig-coupon-response .woocommerce-message,
body.single-wpfunnel_steps
#aig-coupon-response .woocommerce-error,
body.single-wpfunnel_steps
#aig-coupon-response .woocommerce-info {
    display: block !important;
    margin: 0 !important;
    padding: 8px 10px !important;
    border: 0 !important;
    border-radius: 5px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    text-align: left;
    box-shadow: none !important;
}

body.single-wpfunnel_steps
#aig-coupon-response .woocommerce-message {
    background: #edf5ef !important;
    color: #456451 !important;
}

body.single-wpfunnel_steps
#aig-coupon-response .woocommerce-error {
    background: #f8eeee !important;
    color: #805050 !important;
}

body.single-wpfunnel_steps
#aig-coupon-response .woocommerce-info {
    background: #f2f4f5 !important;
    color: #65717a !important;
}

body.single-wpfunnel_steps
#aig-coupon-response .woocommerce-message::before,
body.single-wpfunnel_steps
#aig-coupon-response .woocommerce-error::before,
body.single-wpfunnel_steps
#aig-coupon-response .woocommerce-info::before {
    display: none !important;
}

body.single-wpfunnel_steps
#aig-coupon-response ul.woocommerce-error {
    list-style: none;
    padding-left: 10px !important;
}

/* Mobile Darstellung. */
@media (max-width: 767px) {
    body.single-wpfunnel_steps
    .woocommerce-checkout-review-order-table
    thead {
        display: none !important;
    }

    body.single-wpfunnel_steps
    .woocommerce-checkout-review-order-table
    tr.aig-checkout-coupon-row > td {
        width: 100% !important;
        padding: 14px 12px 16px !important;
        box-sizing: border-box !important;
    }

    body.single-wpfunnel_steps #aig-checkout-coupon,
    body.single-wpfunnel_steps
    #aig-checkout-coupon .aig-coupon-panel,
    body.single-wpfunnel_steps
    #aig-checkout-coupon .aig-checkout-coupon-fields {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }

    body.single-wpfunnel_steps
    #aig-checkout-coupon .aig-checkout-coupon-fields {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 8px;
    }

    body.single-wpfunnel_steps
    #aig-checkout-coupon .aig-coupon-input,
    body.single-wpfunnel_steps
    #aig-checkout-coupon .aig-coupon-button {
        display: block !important;
        grid-column: 1 / -1;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
}

@media (hover: none) and (pointer: coarse) {
    body.single-wpfunnel_steps
    #aig-checkout-coupon .aig-coupon-toggle:focus,
    body.single-wpfunnel_steps
    #aig-checkout-coupon .aig-coupon-toggle:focus-visible,
    body.single-wpfunnel_steps
    #aig-checkout-coupon .aig-coupon-toggle:active {
        outline: none !important;
        border: 0 !important;
        box-shadow: none !important;
    }
}
