:root {
    --summary-section-bgcolor: #fbfbfb; /**was f7f7f7**/
}



/** this is the container placed around the form and summary **/
.gotrgf_form_container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 2em;
}

/* One small-screen breakpoint for the whole plugin: 768px, the same value toggleSummaryLocation() uses in the frontend script. */
@media only screen and (max-width: 768px) {
    .gotrgf_form_container {
        display: block !important;
    }
    .gotrgf_form_wrapper {
        width: 100% !important;
    }
    .gotrgf_summary_wrapper {
        width: 100% !important;
    }
    .gotrgf_form_overview_container {
        margin-top: 2em;
    }
}

.gotrgf_form_container .gotrgf_form_overview_container {
    position: relative;
    box-shadow: var(--gotrls-box-shadow, 0 4px 15px rgba(0, 0, 0, 0.1));
}

/**
 * Sticky side summary (General tab). The box follows the page; when it is taller than the
 * screen, the field lines and the products table scroll while the title, the totals block
 * (subtotal, shipping, tax, discounts) and the total stay in view. Themes can move the box
 * with a "top" of their own on .gotrgf_form_overview_container.
 */
@media only screen and (min-width: 769px) {
    .gotrgf_summary_wrapper .gotrgf_form_overview_container.gotrls-sticky {
        position: -webkit-sticky;
        position: sticky !important;
        top: 5%;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        overflow-y: auto; /* only when the parts that stay in view do not fit on their own */
    }

    .gotrgf_summary_wrapper .gotrgf_form_overview_container.gotrls-sticky > * {
        flex: 0 0 auto;
    }

    .gotrgf_summary_wrapper .gotrgf_form_overview_container.gotrls-sticky > :is(.gotrgf_summary_lines, .gotrgf_summary_products) {
        flex: 0 1 auto;
        min-height: 0;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgba(0, 0, 0, 0.25) transparent;
    }

    .gotrgf_summary_wrapper .gotrgf_form_overview_container.gotrls-sticky > :is(.gotrgf_summary_lines, .gotrgf_summary_products)::-webkit-scrollbar {
        width: 8px;
    }

    .gotrgf_summary_wrapper .gotrgf_form_overview_container.gotrls-sticky > :is(.gotrgf_summary_lines, .gotrgf_summary_products)::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.25);
        border-radius: 4px;
    }

    .gotrgf_summary_wrapper .gotrgf_form_overview_container.gotrls-sticky > :is(.gotrgf_summary_lines, .gotrgf_summary_products)::-webkit-scrollbar-thumb:hover {
        background-color: rgba(0, 0, 0, 0.4);
    }

    .gotrgf_summary_wrapper .gotrgf_form_overview_container.gotrls-sticky > :is(.gotrgf_summary_lines, .gotrgf_summary_products)::-webkit-scrollbar-track {
        background-color: transparent;
    }
}

.gotrgf_form_overview_container>.gotrgf_summary_title {
    border-bottom: 1px solid #e5e5e5;
}

.gotrgf_form_overview_container>.gotrgf_summary_total {
    border-top: 1px solid #e5e5e5;
    display: flex;
}

.gotrgf_form_overview_container>.gotrgf_summary_total>.gotrgf_label {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.gotrgf_form_overview_container>.gotrgf_summary_total>.gotrgf_total_right {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: right;
    padding-left: .75em;
}

.gotrgf_price_amount {
    font-weight: bold;
}

.gotrgf_form_overview_container .gotrgf_summary_line {
    display: flex;
    align-items: flex-start;
    padding: 5px 10px;
    margin-bottom: 0;
    vertical-align: middle;
}

.gotrgf_form_overview_container .gotrgf_summary_line.gotrgf_product_line {
	flex-wrap: wrap;
}

.gotrgf_form_overview_container .gotrgf_summary_line:not(.gotrgf_section_title):not(.gotrgf_page_line) {
    justify-content: space-between;
}
:is(.gotrgf_form_container, .gotrls-mobile-sheet) .gotrgf_form_overview_container .gotrgf_summary_line:not(:last-child) {
    border-bottom: 1px solid var(--gotrls-line-separator-color, #e5e7eb);
}


.gotrgf_form_overview_container>.gotrgf_summary_lines {
    position: relative;
}

.gotrgf_form_overview_container > .gotrgf_summary_lines .gotrgf_summary_line > .gotrgf_line_part_left {
    flex: 1 1 45%;
    min-width: 0;
    overflow-wrap: anywhere;
    padding-right: 1em;
    font-weight: 500;
}

.gotrgf_form_overview_container > .gotrgf_summary_lines .gotrgf_summary_line > .gotrgf_line_part_right {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    text-align: right;
    overflow-wrap: anywhere;
}

/** END OF ORIGINAL FREE CSS **/


/*summary field sizes*/
.gotrgf_small_summary {
    width: 25%;
}

.gotrgf_medium_summary {
    width: 50%;
}

.gotrgf_large_summary {
    width: 100%;
}

/**summary field container**/
.ginput_container_gotrgf_live_summary_field .gotrgf_form_overview_container {
    border-radius: 0;
    padding: 0;
    border-radius: 5px;
    -webkit-border-radius: 5px;
    box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px;
    position: relative;
}


/*summary field title*/
.gotrgf_summary_field_title_container span {
    font-weight: bold;
    font-size: 1em;
    vertical-align: middle;
    color: #333333;
}

.ginput_container_gotrgf_live_summary_field .gotrgf_form_overview_container>.gotrgf_summary_lines {
    padding: 0;
}

.ginput_container_gotrgf_live_summary_field .gotrgf_form_overview_container .gotrgf_summary_line {
    padding: 10px;
    margin-bottom: 0;
    vertical-align: middle;
}

.gotrgf_form_overview_container .gotrgf_nothing_selected {
    padding: 20px 10px;
    margin: 0;
}


/*make sure everything is vertically centered inside the line*/

.ginput_container_gotrgf_live_summary_field .gotrgf_form_overview_container>.gotrgf_summary_lines>.gotrgf_summary_line:not(:last-child) {
    border-bottom: 1px solid var(--gotrls-line-separator-color, #e5e7eb);
}


/*Summary field title section**/

.ginput_container_gotrgf_live_summary_field .gotrgf_summary_field_title_container {
    background-color: #f7f7f7;
    display: flex;
    padding: 10px;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    border-bottom: 3px solid #e5e7eb;
}


/*summary field total container*/

.ginput_container_gotrgf_live_summary_field .gotrgf_summary_field_total_container {
    background-color: var(--summary-section-bgcolor);
    min-height: 40px;
    font-size: 1.2em;
    text-transform: uppercase;
    font-weight: 700;
    padding: 10px;
}


/*Summary field total section*/

.gotrgf_summary_field_total_container {
    display: flex;
}


/*Summary fields that follow the form's summary styling (the values come from the inline style block)*/

.ginput_container_gotrgf_live_summary_field > .gotrgf_form_overview_container.gotrls-form-styled {
    box-shadow: var(--gotrls-box-shadow, 0 4px 15px rgba(0, 0, 0, 0.1));
}

.ginput_container_gotrgf_live_summary_field > .gotrgf_form_overview_container.gotrls-form-styled > .gotrgf_summary_field_title_container {
    display: block;
    min-height: 0;
}

.ginput_container_gotrgf_live_summary_field > .gotrgf_form_overview_container.gotrls-form-styled > .gotrgf_summary_field_title_container > span {
    display: block;
}

.ginput_container_gotrgf_live_summary_field > .gotrgf_form_overview_container.gotrls-form-styled > .gotrgf_summary_field_total_container {
    min-height: 0;
    text-transform: none;
}

.ginput_container_gotrgf_live_summary_field>.gotrgf_form_overview_container>.gotrgf_summary_lines>.gotrgf_summary_line>.gotrgf_line_part_left {
    flex: 1 1 45%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.ginput_container_gotrgf_live_summary_field>.gotrgf_form_overview_container>.gotrgf_summary_lines>.gotrgf_summary_line>.gotrgf_line_part_right {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: right;
}

.gotrgf_summary_field_total_left {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.gotrgf_summary_field_total_right {
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: right;
    padding-left: .75em;
}


/**
 * GP Ecommerce Fields
 **/

.gfs_ecommerce {
    border-bottom: 1px solid var(--gotrls-line-separator-color, #e5e7eb);
}

/* The total bar draws the rule under the block */
.gotrgf_summary_gpecom > .gfs_ecommerce:last-child {
    border-bottom: 0;
}

.gotrgf_label {
    min-width: 36%;
    font-weight: 700;
}

.gfs_tax,
.gfs_discount,
.gfs_subtotal,
.gfs_coupon {
    display: flex;
}

.gfs_discount {
    color: green;
}

.gotrgf_summary_gpecom {
    border-top: 2px solid var(--gotrls-line-separator-color, #e5e7eb);
}

.gotrgf_itemized {
    text-align: right;
}

.gotrgf_itemized>span {
    display: block;
    font-size: 13px;
    /*color: #9e9e9e;    */
    font-style: italic;
}

.gotrgf_hide_image_label .gotrgf_line_part_right .gotrgf_image_label {
    display: none !important;
}

.gfs_coupon {
    border-top: 1px solid #e5e5e5;
    padding: 0.3em;
    font-size: 0.85em;
}

/**
 * Section field
 **/
 :is(.gotrgf_form_container, .gotrls-mobile-sheet) .gotrgf_form_overview_container .gotrgf_section_title {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 25px;
    padding-bottom: 10px;
    background-color: var(--summary-section-bgcolor);
    color: #333333;
    font-weight: bold;
    font-size: 105%;
 }

 .ginput_container_gotrgf_live_summary_field .gotrgf_form_overview_container .gotrgf_summary_line.gotrgf_section_title {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 25px;
    padding-bottom: 10px;
    background-color: var(--summary-section-bgcolor);
    color: #333333;
    font-weight: bold;
    font-size: 105%;
}




/*product lines*/

.gotrgf_pricing_column {
    display: flex;
    align-self: stretch;
}

.gotrgf_pricing_column.gotrgf_price_quantity  {
    flex: 0 0 auto;
    min-width: 2.5em;
    text-align: center;
    justify-content: center;
    font-weight: bold;
}

.gotrgf_pricing_column.gotrgf_price_unit {
    flex: 0 0 auto;
    white-space: nowrap;
    padding-left: .75em;
    text-align: right;
    justify-content: flex-end;
    font-weight: bold;
    gap: 2px;
}

.gotrgf_pricing_column.gotrgf_price_label {
    flex: 1 1 0%; /* zero basis so the label shrinks and the amount stays on the first row of the wrapping product line */
    min-width: 0;
    overflow-wrap: anywhere;
    display: flex;
    flex-direction: column; /* This will make the inner content stack vertically */
    justify-content: space-between; /* This will ensure that the inner rows are evenly spaced */
    font-weight: 500;
}

.gotrgf_pricing_column.gotrgf_price_label.head {
    flex: 3;
    display: block !important
}

/*ensure there is a border when a product has no options*/
.gotrls-product-grid .gotrgf_pricing_column:not(.has-options) {
     border-bottom: 1px solid var(--gotrls-line-separator-color, #e5e7eb);
}

.gotrgf_sub_row {
    width: 100%;
    text-align: left;
    line-height: 1.2;
}

/* .gotrgf_sub_row.field-label {
    font-weight: bold;
} */

.gotrgf_sub_row.sub-label {
    font-style: italic;
    font-weight: 400;
    padding-left: 15px;
    position: relative;
	font-size: 90%;
}


.gotrgf_sub_row.sub-label:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 8px;
    height: 8px;
    border-bottom: 1px solid #CCC;
    border-left: 1px solid #CCC;
}

.gotrgf_unordered_list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.gotrgf_no_flex {
    display: block !important;
}

.gotrgf_single_coupon_wrap {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.gotrgf_single_coupon_wrap:before {
    content: '';
    position: absolute;
    top: 2px;
    left: 5px;
    width: 8px;
    height: 8px;
    border-bottom: 1px solid #CCC;
    border-left: 1px solid #CCC;
}

.gotrgf_single_coupon_wrap .coupon-name {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
    font-style: italic;
    font-weight: 400;
    padding-left: 15px;
}

.gotrgf_single_coupon_wrap .coupon-value {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-left: auto;
    padding-left: .75em;
    font-weight: 700;
}






/**
 * Product Table/Grid
 **/
.gotrls-product-grid {
    display: grid;
    /* grid-template-columns: 1fr auto auto;  */
    gap: 0;
    width: 100%;
    row-gap: 0;

}

.gotrls-product-grid.col-2 {
    grid-template-columns: minmax(0, 1fr) auto;
}

.gotrls-product-grid.col-3 {
    grid-template-columns: minmax(0, 1fr) auto auto;
}

.gotrls-product-grid.col-4 {
    grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.gotrls-product-grid .gotrgf-grid-heading {
    background-color: var(--summary-section-bgcolor);
}

.gotrls-product-grid .gotrgf-grid-heading > div {
    color: #333;
    font-weight: bold;
    padding: 25px 10px 10px 10px;
    background-color: var(--summary-section-bgcolor);
    border-bottom: 1px solid var(--gotrls-line-separator-color, #e5e7eb);
    border-top: 1px solid var(--gotrls-line-separator-color, #e5e7eb);
    font-size: 0.85em;
    font-size: 110%;
}

.gotrls-product-grid .gotrls-product-head.price,  .gotrls-product-grid .gotrls-product-head.unitprice{
    text-align: right;
    padding-left: 10px;

}

.gotrls-product-grid .gotrls-product-head.quantity {
    text-align: center;

}

.gotrls-product-grid div.gotrls-grid-item {
    padding: 8px;
    border: none;
    white-space: pre-wrap;
}

.gotrls-product-grid .gotrgf_summary_line.even > div {
    padding: 10px;
}

.gotrls-product-grid .gotrgf_summary_line.even > div:last-of-type {
	border-bottom: 1px solid var(--gotrls-line-separator-color, #e5e7eb);
}

.gotrls-product-grid .gotrgf_summary_line.odd > div {
    padding: 10px;
}

.gotrls-product-grid .gotrgf_summary_line.odd > div:last-of-type {
    border-bottom: 1px solid var(--gotrls-line-separator-color, #e5e7eb);
}

.gotrls-product-grid .gotrgf_summary_line  {
    display: contents;
    margin-bottom: 0 !important;
}

.gotrls-product-grid .gotrgf_summary_line .gotrgf_pricing_column.has-options {
	padding-bottom: 0 !important;
}

.gotrls-product-grid .gotrgf_summary_line .gotrgf_options_full_width {
	padding-top: 0 !important;
}

.gotrls-product-grid .gotrgf_pricing_column  {
    display: block !important;
}

.gotrgf_summary_gpecom .gotrgf_summary_line {
    margin-bottom: 0;
}


/**
 * Spinner
 **/
.gotrgf_preloader_image {
    position: absolute;
    top: calc(50% - 8px);
    left: calc(50% - 8px);
}

.gotrgf_hide_preloader {
    display: none;
}

.gotr_summary_spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 25px; /* Adjust the size of the spinner */
    height: 25px;
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-top: 4px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}



/**
 * Fontawesome
 **/
.lsfa-free {
    position: relative;
}

.lsfa-free .gotrgf_line_part_left {
    min-width: 0 !important;
}

.gotrgf_summary_lines .gotrgf_summary_line.lsfa-free::before,
.gotrgf_summary_products .gotrgf_summary_line.lsfa-free .gotrgf_price_label:before {
	font-weight: 900;
	font-family: 'Font Awesome 6 Free';
    margin-right: 10px;
}

.gotrgf_summary_products .gotrls-product-grid .gotrgf_summary_line.lsfa-free .gotrgf_price_label {
    position: relative;
    display: flex;
}






/**
 * Image Choices
 **/
.gotrgf_choice_image_wrap {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    margin-bottom: 5px;
}

/* .gotrgf_choice_image_wrap .gotrgf_summary_image_choice {
    max-width: 30px;
} */

.gotrgf_price_label_inner {
    display: flex;
}

.gotrgf_price_image {
    align-items: flex-start;
}

.gotrgf_price_image img {
    max-width: 50px;
    margin-right: 10px;
}

/*hide product option sub line classes*/
.gotrgf_sub_row.gfls-hide-option,
.gotrgf_summary_line.gfls-hide-options .gotrgf_sub_row.sub-label {
    display: none !important;
}





.gotrgf_form_overview_container .gotrgf_summary_line.gotrgf_product_line .gotrgf_options_full_width .gotrgf_sub_row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 1em;
}

.gotrgf_options_full_width {
    flex: 1 0 100%;
	grid-column: 1 / -1;
}


/**
 * Pages in summary
 **/

/* Side Summary Container */
.gotrgf-summary-container {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    max-width: 350px;  /* Or adjust to fit your layout */
    margin: 0 auto;
}

/**
 * Page groups of a summary grouped by page (since 2.2.0 the colours and sizes come from the
 * Page groups settings, printed as variables on the summary container; the fallbacks are the
 * original look).
 */
.gotrgf-page-summary {
    background-color: var(--gotrls-page-group-background, #ffffff);
    border: 1px solid var(--gotrls-page-group-border-color, transparent);
    border-radius: var(--gotrls-page-group-radius, 0);
    margin-bottom: var(--gotrls-page-group-spacing, 0);
    overflow: hidden;
}

/* Groups that touch share their border */
.gotrgf-page-summary + .gotrgf-page-summary {
    margin-top: -1px;
}

.gotrgf-page-summary:last-child {
    margin-bottom: 0;
}

/* Page title (accordion header) */
.gotrgf_form_overview_container .gotrgf_summary_line.gotrgf_page_line,
.gotrgf_form_container .gotrgf_form_overview_container .gotrgf_summary_line.gotrgf_page_line {
    background-color: var(--gotrls-page-group-header-background, #f3f3f3);
    color: var(--gotrls-page-group-header-color, inherit);
    font-weight: var(--gotrls-page-group-header-weight, bold);
    padding: var(--gotrls-page-group-header-padding, 5px 10px);
    border-bottom: 1px solid var(--gotrls-page-group-header-border-color, var(--gotrls-line-separator-color, #e5e7eb));
    align-items: flex-end;
    position: relative;
    transition: background-color 0.3s ease;
}

.gotrgf_page_line.collapsible {
    cursor: pointer;
}

/* A slightly darker header on hover, whatever its background */
.gotrgf_page_line.collapsible:hover {
    background-image: linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05));
}

.gotrgf_page_line .gotrgf_edit_page {
    margin-left: 5px;
    font-size: 0.8em;
    color: var(--gotrls-page-group-icon-color, #666666);
    text-decoration: none;
}

.gotrgf_page_line .gotrgf_edit_page:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* An icon without a fill of its own takes the edit link colour */
.gotrgf_page_line .gotrgf_edit_page svg {
    width: 17px;
    height: 1em;
    vertical-align: -0.15em;
}

.gotrgf_page_line .gotrgf_edit_page svg:not([fill]) {
    fill: currentColor;
}

/* Accordion icon (closed state: chevron down) */
.gotrgf_page_line.collapsible::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--gotrls-page-group-icon-color, #666666);
    border-bottom: 2px solid var(--gotrls-page-group-icon-color, #666666);
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.3s ease, border-color 0.3s ease;
}

/* Accordion icon (open state: chevron up) */
.gotrgf-page-summary.open .gotrgf_page_line.collapsible::after {
    transform: translateY(-50%) rotate(-135deg);
}


/**
 * Responsive lines (since 2.2.0)
 *
 * Labels wrap, amounts never do. The summary container carries a layout class
 * (gotrls-layout-auto|inline|stacked) and, when it is narrower than the stack
 * breakpoint, the gotrls-narrow class. Every line carries gotrls-kind-text or
 * gotrls-kind-price.
 */
.gotrgf_form_overview_container .gotrgf_pricing_column.gotrgf_price_image {
    flex: 0 0 auto;
}

.gotrgf_form_overview_container .gotrgf_option_label {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.gotrgf_form_overview_container .option_price {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-left: auto;
    text-align: right;
}

.gotrls-product-grid .gotrgf_pricing_column.gotrgf_price_unit,
.gotrls-product-grid .gotrls-product-head.price,
.gotrls-product-grid .gotrls-product-head.unitprice {
    white-space: nowrap;
}

/* Stacked layout: text answers become label above value, prices keep their column. */
.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrls-kind-text {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
}

.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrls-kind-text > .gotrgf_line_part_left {
    flex: 0 0 auto;
    width: 100%;
    padding-right: 0;
    font-size: .85em;
    font-weight: 500;
    opacity: .75;
}

.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrls-kind-text > .gotrgf_line_part_right {
    flex: 0 0 auto;
    width: 100%;
    text-align: left;
}

.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrls-kind-text .gotrgf_choice_image_wrap {
    justify-content: flex-start;
}

.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrls-kind-price .gotrgf_options_full_width .gotrgf_sub_row {
    gap: .5em;
}

.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrls-kind-price .gotrgf_price_image img {
    max-width: 32px;
}

/* Stacked layout for product lines: name on its own row, amount right aligned on the next row, options below. */
.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrgf_product_line {
    flex-wrap: wrap;
}

.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrgf_product_line > .gotrgf_pricing_column.gotrgf_price_label {
    /* A basis over 50% keeps the name on the first row (next to an optional image) and pushes the 100% wide amount to the next row. */
    flex: 1 1 60%;
    min-width: 0;
}

.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrgf_product_line > .gotrgf_pricing_column.gotrgf_price_unit {
    flex: 1 1 100%;
    justify-content: flex-end;
    padding-left: 0;
    padding-top: 2px;
}

.gotrgf_form_overview_container:is(.gotrls-layout-stacked, .gotrls-layout-auto.gotrls-narrow) .gotrgf_summary_line.gotrgf_product_line .gotrgf_options_full_width {
    padding-top: 2px;
}

/*
 * Changed lines are briefly highlighted instead of dimming the whole summary.
 * Override the colour and duration with the CSS variables, e.g.
 * #gotrgf_form_overview_container_37 { --gotrls-highlight-color: rgba(0, 128, 255, .25); }
 */
.gotrgf_form_overview_container {
    --gotrls-highlight-color: rgba(255, 213, 79, .35);
    --gotrls-highlight-duration: 1.2s;
}

@keyframes gotrls-line-flash {
    from { background-color: var(--gotrls-highlight-color); }
    to   { background-color: transparent; }
}

.gotrgf_form_overview_container .gotrgf_summary_line.gotrls-line-changed {
    animation: gotrls-line-flash var(--gotrls-highlight-duration) ease-out;
}

@media (prefers-reduced-motion: reduce) {
    .gotrgf_form_overview_container .gotrgf_summary_line.gotrls-line-changed {
        animation: none;
    }
}

/**
 * Mobile bar (since 2.2.0): the side summary as a bar at the bottom of the screen
 * with the summary in a sheet that opens above it.
 *
 * The bar and the sheet sit in a layer directly in the body, so stacking contexts of the
 * theme (z-index, transform, filter on content wrappers) cannot paint page content over them.
 * The script keeps --gotrls-mobile-bar-height on the body up to date.
 */
body.gotrls-has-mobile-bar {
    padding-bottom: var(--gotrls-mobile-bar-height, 56px);
}

.gotrls-mobile-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: var(--gotrls-mobile-z, 99990);
    display: flex;
    align-items: center;
    gap: 1em;
    width: 100%;
    margin: 0;
    padding: var(--gotrls-mobile-bar-padding, .9em 1em);
    border: 0;
    border-top: 1px solid var(--gotrls-mobile-bar-border, #e5e7eb);
    border-radius: 0;
    background: var(--gotrls-mobile-bar-bg, #fff);
    box-shadow: 0 -4px 15px rgba(0, 0, 0, .1);
    color: var(--gotrls-mobile-bar-color, inherit);
    font: inherit;
    text-align: left;
    text-transform: none;
    letter-spacing: normal;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

/* Themes style every button; keep the bar looking the same in all states. */
.gotrls-mobile-bar:hover,
.gotrls-mobile-bar:focus,
.gotrls-mobile-bar:active {
    background: var(--gotrls-mobile-bar-bg, #fff);
    color: var(--gotrls-mobile-bar-color, inherit);
    outline: none;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, .1);
}

.gotrls-mobile-bar:focus-visible {
    box-shadow: 0 -4px 15px rgba(0, 0, 0, .1), inset 0 0 0 2px currentColor;
}

.gotrls-mobile-bar__text {
    display: flex;
    flex: 1 1 auto;
    justify-content: space-between;
    align-items: center;
    gap: 1em;
    min-width: 0;
}

.gotrls-mobile-bar__primary {
    font-weight: 700;
    white-space: nowrap;
}

.gotrls-mobile-bar__secondary {
    font-size: .9em;
    opacity: .75;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gotrls-mobile-bar__chevron {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-right: 4px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform .2s;
}

.gotrls-mobile-bar[aria-expanded="true"] .gotrls-mobile-bar__chevron {
    transform: rotate(135deg);
}

.gotrls-mobile-sheet {
    position: fixed;
    inset: 0;
    z-index: calc(var(--gotrls-mobile-z, 99990) - 1);
}

.gotrls-mobile-sheet[hidden] {
    display: none;
}

.gotrls-mobile-sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .4);
}

.gotrls-mobile-sheet__panel {
    position: absolute;
    left: 0;
    right: 0;
    bottom: var(--gotrls-mobile-bar-height, 56px);
    max-height: 80vh;
    overflow: auto;
    padding: .5em .5em .75em;
    background: var(--gotrls-mobile-sheet-bg, #fff);
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, .2);
    animation: gotrls-sheet-up .25s ease-out;
}

.gotrls-mobile-sheet__panel:focus {
    outline: none;
}

.gotrls-mobile-sheet__panel .gotrgf_form_overview_container {
    margin-top: 0;
    box-shadow: none;
}

@keyframes gotrls-sheet-up {
    from { transform: translateY(1em); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .gotrls-mobile-sheet__panel {
        animation: none;
    }
}
