
/* =====================================================
   GMD – Voucher Price Options
   Vendor ACF Form Styling
   Version: 1.2
   ===================================================== */

/* 1. Main repeater container */

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"] > .acf-input,
body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"] .acf-repeater {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

/* 2. Table layout */

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-repeater > .acf-table {
    width: 100% !important;
    table-layout: fixed !important;
    border-collapse: separate;
    border-spacing: 0;
}

/* 3. Column widths
   Reserve 6% for ACF row controls.
   Remaining 94% divided 70/15/15.
*/

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-table thead th[data-name="option_name"] {
    width: 65.8% !important;
}

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-table thead th[data-name="option_retail_price"] {
    width: 14.1% !important;
}

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-table thead th[data-name="option_sale_price"] {
    width: 14.1% !important;
}

/* 4. Row control columns */

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-table .acf-row-handle {
    width: 3% !important;
    padding: 5px !important;
    box-sizing: border-box;
}

/* 5. Input cells */

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-table tbody td.acf-field {
    padding: 10px !important;
    box-sizing: border-box;
}

/* 6. Full-width input wrappers */

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-table tbody td.acf-field .acf-input,
body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-table tbody td.acf-field .acf-input-wrap {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

/* 7. Full-width text and number inputs */

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-table tbody td.acf-field input[type="text"],
body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-table tbody td.acf-field input[type="number"] {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

/* 8. Add Price Option area */

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-repeater > .acf-actions {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;

    width: 100% !important;
    padding: 15px 0 !important;
    box-sizing: border-box;
}

/* 9. Blue Add Price Option button */

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-repeater > .acf-actions a[data-event="add-row"] {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;

    position: static !important;
    transform: none !important;
    float: none !important;
    flex: 0 0 auto !important;

    width: 190px !important;
    min-width: 190px !important;
    max-width: none !important;

    padding: 12px 18px !important;

    background: #00aeef !important;
    color: #ffffff !important;
    border: 0 !important;
    border-radius: 8px !important;

    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 20px !important;

    white-space: nowrap !important;
    word-break: normal !important;
    text-decoration: none !important;
    box-shadow: none !important;

    cursor: pointer;
    box-sizing: border-box;
}

/* 10. Button hover */

body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-repeater > .acf-actions a[data-event="add-row"]:hover,
body:not(.wp-admin)
.acf-field[data-name="voucher_price_options"]
.acf-repeater > .acf-actions a[data-event="add-row"]:focus {
    background: #009bd5 !important;
    color: #ffffff !important;
    text-decoration: none !important;
}
