/**
 * Mot o46 overrides — woo-refund-and-exchange-lite
 * Visual language aligned with My Account (orders, order detail, addresses).
 */

/* =========================================
   Shared tokens / helpers
   ========================================= */

.wps-rma-form__wrapper,
.wps_rma_outer_wrap_info,
.wps_rma_return_rules,
.woocommerce-MyAccount-content .wps_rma_return_rules {
  color: var(--darkgrey-color);
  font-family: var(--font-family-body, inherit);
  box-sizing: border-box;
}

.wps-rma-form__wrapper *,
.wps_rma_outer_wrap_info *,
.wps_rma_return_rules * {
  box-sizing: border-box;
}

/* Hide default WC breadcrumb on refund form (theme has global breadcrumbs) */
#primary.site-main:has(.wps_rma_refund_form_wrapper) > .woocommerce-breadcrumb,
#primary.site-main:has(.wps-rma-form__wrapper) > .woocommerce-breadcrumb {
  display: none;
}

/* =========================================
   Refund request form — page shell
   ========================================= */

#primary.site-main:has(.wps_rma_refund_form_wrapper),
#primary.site-main:has(.wps-rma-form__wrapper) {
  width: 100%;
  max-width: var(--max-width);
  margin: 40px auto 120px;
  padding: 0 var(--padding-horizontal);
}

.wps_rma_refund_form_wrapper.wps-rma-form__wrapper,
.wps-rma-form__wrapper {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Header — same as .orders__list-header */
.wps-rma-form__wrapper .wps-rma-form__header {
  background-color: var(--darkgrey-color) !important;
  border-radius: 8px;
  margin-bottom: 24px;
  overflow: hidden;
}

.wps-rma-form__wrapper .wps-rma-form__heading {
  margin: 0 !important;
  padding: 14px 25px !important;
  color: var(--white-color) !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
}

.wps-rma-form__wrapper .wps-rma-form__notice {
  margin: 0 0 20px !important;
  border-radius: 8px !important;
  padding: 14px 18px !important;
}

.wps-rma-form__wrapper .wps-rma-form__notice.woocommerce-error {
  background: #d01c331a !important;
  border-color: transparent !important;
  color: var(--red-color) !important;
}

.wps-rma-form__wrapper .wps-rma-form__notice.woocommerce-message {
  background: #3bb03b1a !important;
  border-color: transparent !important;
  color: #3bb03b !important;
}

/* =========================================
   Product table — .myaccount__order-table
   ========================================= */

.wps-rma-form__wrapper .wps-rma-product__table-wrapper,
.wps-rma-form__wrapper .wps_rma_product_table_wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 !important;
  margin: 0 0 24px;
  border: none;
  border-radius: 8px;
  background: var(--white-color);
  box-shadow: 0 0 0 1px var(--grey-color);
}

.wps-rma-form__wrapper .wps-rma-product__table {
  min-width: 560px;
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  border-style: hidden;
}

.wps-rma-form__wrapper td,
.wps-rma-form__wrapper th {
  border: none !important;
  padding: 20px !important;
  text-align: left !important;
  vertical-align: middle !important;
  color: var(--darkgrey-color);
  background: transparent !important;
}

.wps-rma-form__wrapper td.product-total,
.wps_rma_outer_wrap_info td.product-total {
  padding-top: 20px !important;
  vertical-align: top !important;
}

.wps-rma-form__wrapper thead th {
  padding-top: 20px !important;
  padding-bottom: 12px !important;
  font-weight: 700;
  background: transparent !important;
}

.wps-rma-form__wrapper tbody tr {
  border-bottom: 1px solid var(--grey-color);
}

.wps-rma-form__wrapper tbody tr:last-child {
  border-bottom: none;
}

.wps-rma-form__wrapper tbody tr:last-child th,
.wps-rma-form__wrapper tbody tr:last-child td {
  border-top: 1px solid var(--grey-color) !important;
  font-weight: 700;
}

.wps-rma-form__wrapper .wps-rma-product__wrap {
  display: flex;
  align-items: center;
  justify-content: flex-start !important;
  gap: 16px;
  text-align: left;
}

.wps-rma-form__wrapper .wps-rma-product__wrap img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 8px;
  background: var(--light-color);
  flex-shrink: 0;
}

.wps-rma-form__wrapper .wps-rma__product-title,
.wps-rma-form__wrapper .wps_rma_product_title {
  margin-left: 0 !important;
  padding: 0 !important;
}

.wps-rma-form__wrapper .wps-rma__product-title a,
.wps-rma-form__wrapper .wps_rma_product_title a {
  color: var(--darkgrey-color);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.wps-rma-form__wrapper .wps-rma__product-title a:hover,
.wps-rma-form__wrapper .wps_rma_product_title a:hover {
  color: var(--red-color);
}

.wps-rma-form__wrapper .wps-rma__product-title p,
.wps-rma-form__wrapper .wps_rma_product_title p {
  margin: 10px 0 0;
  font-size: 14px;
  font-weight: 400;
}

.wps-rma-form__wrapper .wps-rma__product-title .product-quantity,
.wps-rma-form__wrapper .wps_rma_product_title .product-quantity {
  display: inline-block;
  margin-top: 4px;
}

/* Space above price amount (after quantity / headers) */
.wps-rma-form__wrapper .wps_wrma_formatted_price,
.wps_rma_outer_wrap_info .wps_wrma_formatted_price {
  display: inline-block;
}

.wps-rma-form__wrapper .wps-rma__product-title .product-quantity + p,
.wps-rma-form__wrapper .wps_rma_product_title .product-quantity + p {
  margin-top: 12px;
}

.wps-rma-form__wrapper td.product-total .wps_wrma_formatted_price,
.wps-rma-form__wrapper .wps_rma_total_amount_wrap .wps_wrma_formatted_price,
.wps_rma_outer_wrap_info td.product-total .wps_wrma_formatted_price {
  margin-top: 0;
}

.wps-rma-form__wrapper .wps_rma_total_amount_wrap,
.wps-rma-form__wrapper #wps_rma_total_refund_amount {
  color: var(--red-color);
  font-weight: 700;
}

/* Keep currency + amount on one line (plugin splits them into text + .wps_wrma_formatted_price) */
.wps_wrma_formatted_price {
  white-space: nowrap;
  display: inline;
}

.wps-rma-form__wrapper .product-total,
.wps-rma-form__wrapper .wps_rma_total_amount_wrap,
.wps-rma-form__wrapper #wps_rma_total_refund_amount,
.wps-rma-form__wrapper .wps-rma__product-title p,
.wps-rma-form__wrapper .wps_rma_product_title p,
.wps_rma_outer_wrap_info .product-total,
.wps_rma_outer_wrap_info td.product-total,
.wps_rma_outer_wrap_info tbody tr:last-child th:last-child {
  white-space: nowrap;
}

.wps-rma-form__wrapper .product-total .tax_label,
.wps-rma-form__wrapper .product-total .wps_shipping_label,
.wps-rma-form__wrapper .wps_rma_total_amount_wrap .tax_label,
.wps-rma-form__wrapper .wps_rma_total_amount_wrap .wps_shipping_label {
  white-space: normal;
  display: block;
}

.wps-rma-form__wrapper .tax_label,
.wps-rma-form__wrapper .wps_shipping_label {
  display: block;
  margin-top: 4px;
  font-size: var(--font-size-body-caption, 12px);
  font-weight: 400;
  color: var(--darkgrey-color);
  opacity: 0.7;
}

.wps-rma-form__wrapper .product-quantity input,
.wps-rma-form__wrapper .wps_rma_return_product_qty {
  width: 96px !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1px solid var(--grey-color) !important;
  border-radius: 50px !important;
  background: var(--white-color) !important;
  text-align: center;
  box-shadow: none !important;
  color: var(--darkgrey-color) !important;
}

/* =========================================
   Form fields card
   ========================================= */

.wps-rma-form__wrapper .wps-rma-refund-request__row,
.wps-rma-form__wrapper .wps-rma-row__pd,
.wps-rma-form__wrapper .wps_rma_refund_request__row {
  padding: 20px !important;
  margin: 0 0 24px;
  border: 1px solid var(--grey-color);
  border-radius: 8px;
  background: var(--white-color);
}

.wps-rma-form__wrapper .wps-rma-col,
.wps-rma-form__wrapper .wps_rma__column {
  width: 100%;
}

.wps-rma-form__wrapper label,
.wps-rma-form__wrapper label b {
  margin-bottom: 10px !important;
  color: var(--darkgrey-color);
  font-size: var(--font-size-body-bg, 18px);
  font-weight: 700;
}

.wps-rma-form__wrapper .wps_field_mendatory {
  color: var(--red-color) !important;
}

.wps-rma-form__wrapper textarea,
.wps-rma-form__wrapper input[type='text'],
.wps-rma-form__wrapper input[type='number'],
.wps-rma-form__wrapper input[type='email'],
.wps-rma-form__wrapper input[type='tel'],
.wps-rma-form__wrapper input[type='url'],
.wps-rma-form__wrapper input[type='password'],
.wps-rma-form__wrapper input[type='search'],
.wps-rma-form__wrapper .input-text,
.wps-rma-form__wrapper select,
.wps_rma_refund_form_wrapper .wps-rma-subject__dropdown select,
.wps_rma_refund_form_wrapper select#wps_rma_return_request_subject,
.wps_rma_refund_form_wrapper .wps_rma_other_subject input,
.wps-rma-form__wrapper .wps_rma_other_subject input,
.wps-rma-form__wrapper .wps_rma_return_request_subject_text,
.wps_rma_refund_form_wrapper .wps_rma_return_request_subject_text {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  box-sizing: border-box !important;
  padding: 14px 21px !important;
  border: 1px solid var(--grey-color) !important;
  border-radius: 50px !important;
  background-color: var(--white-color) !important;
  box-shadow: none !important;
  color: var(--darkgrey-color) !important;
  font-size: var(--font-size-body-bg, 18px) !important;
  line-height: 1.4 !important;
  appearance: none;
  -webkit-appearance: none;
}

.wps-rma-form__wrapper select,
.wps_rma_refund_form_wrapper .wps-rma-subject__dropdown select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M15 7.5C15 7.5 11.318 12.5 10 12.5C8.682 12.5 5 7.5 5 7.5' stroke='%2326272C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 16px center !important;
  background-size: 20px !important;
  padding-right: 48px !important;
}

.wps-rma-form__wrapper textarea,
.wps-rma-form__wrapper .wps_rma_bank_details,
.wps-rma-form__wrapper .wps_rma_return_request_reason {
  border-radius: 16px !important;
  min-height: 140px;
  resize: vertical;
}

.wps-rma-form__wrapper textarea:focus,
.wps-rma-form__wrapper input[type='text']:focus,
.wps-rma-form__wrapper input[type='number']:focus,
.wps-rma-form__wrapper input[type='email']:focus,
.wps-rma-form__wrapper input[type='tel']:focus,
.wps-rma-form__wrapper select:focus {
  outline: none !important;
  border-color: var(--darkgrey-color) !important;
}

.wps-rma-form__wrapper .wps_rma_subject_dropdown,
.wps-rma-form__wrapper .wps-rma-subject__dropdown,
.wps-rma-form__wrapper .wps_rma_other_subject,
.wps-rma-form__wrapper .wps_rma_reason_description,
.wps-rma-form__wrapper .wps_rma_attach_files,
.wps-rma-form__wrapper #bank_details,
.wps-rma-form__wrapper .wps_rma_section {
  margin-top: 20px;
  margin-bottom: 0;
}

/* Force pill radius on "Other" subject (plugin resets border-radius on this field) */
.wps_rma_refund_form_wrapper .wps_rma_other_subject input[type='text'],
.wps-rma-form__wrapper .wps_rma_other_subject input[type='text'],
.wps_rma_refund_form_wrapper input.wps_rma_return_request_subject_text,
.wps-rma-form__wrapper input.wps_rma_return_request_subject_text {
  border-radius: 50px !important;
  -webkit-border-radius: 50px !important;
}

.wps-rma-form__wrapper .wps_rma_subject_dropdown:first-child,
.wps-rma-form__wrapper .wps-rma-subject__dropdown:first-child,
.wps-rma-form__wrapper #bank_details:first-child {
  margin-top: 0;
}

/* File attach */
.wps-rma-form__wrapper .wps_rma_return_request_files,
.wps-rma-form__wrapper input[type='file'] {
  width: 100%;
  padding: 12px 16px;
  border: 1px dashed var(--grey-color);
  border-radius: 8px;
  background: var(--light-color);
  color: var(--darkgrey-color);
  cursor: pointer;
}

.wps-rma-form__wrapper .wps_rma_return_request_morefiles {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  margin-top: 12px !important;
  padding: 13px 20px !important;
  border-radius: 50px !important;
  border: 1px solid var(--darkgrey-color) !important;
  background: transparent !important;
  color: var(--darkgrey-color) !important;
  font-size: var(--font-size-body-bg, 18px) !important;
  font-weight: 400 !important;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.wps-rma-form__wrapper .wps_rma_return_request_morefiles:hover {
  background: var(--darkgrey-color) !important;
  color: var(--white-color) !important;
}

/* Primary CTA — .orders__list-button / auth buttons */
.wps-rma-form__wrapper input.btn,
.wps-rma-form__wrapper input.button,
.wps-rma-form__wrapper .button.btn,
.wps-rma-form__wrapper input[name='wps_rma_return_request_submit'] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: fit-content;
  min-height: unset !important;
  margin: 24px 0 0 !important;
  padding: 13px 20px !important;
  border-radius: 50px !important;
  border: 1px solid var(--red-color) !important;
  background: var(--red-color) !important;
  color: var(--white-color) !important;
  font-size: var(--font-size-body-bg, 18px) !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  cursor: pointer;
  float: none !important;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.wps-rma-form__wrapper input.btn:hover,
.wps-rma-form__wrapper input.button:hover,
.wps-rma-form__wrapper input[name='wps_rma_return_request_submit']:hover {
  background: var(--darkred-color) !important;
  border-color: var(--darkred-color) !important;
  color: var(--white-color) !important;
}

/* Customer details — .wma-address-card / .myaccount__order-address */
.wps-rma-form__wrapper .wps_rma_customer_detail {
  padding: 0 !important;
  margin-top: 8px;
  overflow: visible;
}

.wps-rma-form__wrapper .wps_rma_customer_detail .woocommerce-columns {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.wps-rma-form__wrapper .wps_rma_customer_detail .woocommerce-column {
  border: 1px solid var(--grey-color) !important;
  border-radius: 8px !important;
  padding: 20px !important;
  background: var(--white-color);
  margin: 0 !important;
}

.wps-rma-form__wrapper .wps_rma_customer_detail .woocommerce-column__title,
.wps-rma-form__wrapper .wps_rma_customer_detail h2 {
  margin: 0 0 16px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--darkgrey-color);
}

.wps-rma-form__wrapper .wps_rma_customer_detail address,
.wps-rma-form__wrapper .wps_rma_customer_detail p {
  margin: 0;
  font-style: normal;
  font-size: 16px;
  line-height: 1.5;
}

/* Refund rules (form + order view) */
.wps-rma-form__wrapper .wps_rma_return_rules,
.wps-rma-form__wrapper .wps_rma_exchange_rules,
.woocommerce-MyAccount-content .wps_rma_return_rules,
.wps_rma_return_rules {
  margin: 24px 0 0;
  padding: 20px;
  border: 1px solid var(--grey-color);
  border-radius: 8px;
  background: var(--light-color);
}

.wps-rma-form__wrapper .wps_rma_return_rules > h2,
.wps-rma-form__wrapper .wps_rma_exchange_rules > h2,
.woocommerce-MyAccount-content .wps_rma_return_rules > h2,
.wps_rma_return_rules > h2 {
  margin: 0 0 12px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--darkgrey-color);
}

.wps_rma_return_rules p,
.wps-rma-form__wrapper .wps_rma_return_rules p {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.5;
}

.wps_rma_return_rules p:last-child {
  margin-bottom: 0;
}

/* =========================================
   My Account order actions (Refund / View msg)
   ========================================= */

.woocommerce-MyAccount-content form:has(input[name='ced_new_return_request']),
.woocommerce-MyAccount-content form:has(.wps_rma_view_order),
.woocommerce-MyAccount-content form:has(.wps_rma_cancel_order) {
  margin: 0 0 8px;
}

.woocommerce-MyAccount-content form:has(input[name='ced_new_return_request']) {
  margin-top: 24px;
  padding-top: 8px;
}

.woocommerce-MyAccount-content form:has(input[name='ced_new_return_request']) > p {
  margin: 0;
}

.woocommerce-MyAccount-content input.btn.button[name='ced_new_return_request'],
.woocommerce-MyAccount-content input.btn.button[name='wps_mra_return_request'],
.woocommerce-MyAccount-content input.btn.button.wps_rma_view_order,
.woocommerce-MyAccount-content input.btn.button.wps_rma_cancel_order,
.woocommerce-MyAccount-content .button.wps_rma_view_order,
.woocommerce-MyAccount-content .button.wps_rma_cancel_order,
.woocommerce-orders-table__cell-order-actions .return,
.woocommerce-orders-table__cell-order-actions .view_msg,
.woocommerce-orders-table__cell-order-actions .exchange,
.button[name='wps_rma_new_return_request'],
.wps_rma_outer_wrap_info input.btn[name='wps_mra_return_request'],
.wps_rma_outer_wrap_info input.button[name='wps_mra_return_request'] {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: fit-content !important;
  min-height: unset !important;
  margin: 0 8px 8px 0 !important;
  padding: 13px 20px !important;
  border-radius: 50px !important;
  border: 1px solid var(--red-color) !important;
  background: var(--red-color) !important;
  color: var(--white-color) !important;
  font-size: var(--font-size-body-bg, 18px) !important;
  font-weight: 400 !important;
  line-height: 1.2 !important;
  float: none !important;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.woocommerce-MyAccount-content input.btn.button[name='ced_new_return_request']:hover,
.woocommerce-MyAccount-content input.btn.button[name='wps_mra_return_request']:hover,
.woocommerce-MyAccount-content input.btn.button.wps_rma_view_order:hover,
.woocommerce-MyAccount-content .button.wps_rma_view_order:hover,
.woocommerce-orders-table__cell-order-actions .return:hover,
.woocommerce-orders-table__cell-order-actions .view_msg:hover,
.wps_rma_outer_wrap_info input.btn[name='wps_mra_return_request']:hover,
.wps_rma_outer_wrap_info input.button[name='wps_mra_return_request']:hover {
  background: var(--darkred-color) !important;
  border-color: var(--darkred-color) !important;
  color: var(--white-color) !important;
}

/* Cancel / secondary */
.woocommerce-MyAccount-content input.btn.button[name='wps_rma_cancel_return_request'],
.woocommerce-MyAccount-content .button.wps_rma_cancel_order,
.wps_rma_outer_wrap_info input.btn[name='wps_rma_cancel_return_request'] {
  background: transparent !important;
  border: 1px solid var(--darkgrey-color) !important;
  color: var(--darkgrey-color) !important;
}

.woocommerce-MyAccount-content input.btn.button[name='wps_rma_cancel_return_request']:hover,
.woocommerce-MyAccount-content .button.wps_rma_cancel_order:hover,
.wps_rma_outer_wrap_info input.btn[name='wps_rma_cancel_return_request']:hover {
  background: var(--darkgrey-color) !important;
  color: var(--white-color) !important;
}

/* =========================================
   .wps_rma_outer_wrap_info — order detail panel
   ========================================= */

.wps_rma_outer_wrap_info {
  margin: 32px 0 0;
  width: 100%;
}

.wps_rma_outer_wrap_info .wps_rma_ul_wrap_info {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  list-style: none !important;
  background: var(--light-color) !important;
  border: none !important;
  border-radius: 8px 8px 0 0 !important;
  box-shadow: 0 0 0 1px var(--grey-color);
  cursor: pointer;
  overflow: hidden;
}

.wps_rma_outer_wrap_info ul.wps_rma_ul_wrap_info li,
.wps_rma_outer_wrap_info .wps_rma_li_wrap_info {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.wps_rma_ul_wrap_info .wps_rma_li_wrap_info h2 {
  margin: 0 !important;
  padding: 14px 20px !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: var(--darkgrey-color);
  background: transparent !important;
  border-radius: 0 !important;
  border-bottom: none !important;
  transition: color 0.2s ease-in-out, background-color 0.2s ease-in-out;
}

.wps_rma_ul_wrap_info .wps_rma_li_wrap_info.active h2 {
  background: var(--white-color) !important;
  color: var(--red-color) !important;
}

.wps_rma_refund_info_wrap,
.wps_rma_exchange_info_wrap,
.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap {
  padding: 20px !important;
  border: none !important;
  border-radius: 0 0 8px 8px !important;
  background: var(--white-color);
  box-shadow: 0 0 0 1px var(--grey-color);
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap h2 {
  margin: 0 0 16px !important;
  font-size: 18px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  color: var(--darkgrey-color);
  border-bottom: none !important;
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap p {
  margin: 0 0 16px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--darkgrey-color);
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap p:last-child {
  margin-bottom: 0;
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table {
  width: 100%;
  margin: 0 0 20px !important;
  border-collapse: collapse;
  border-style: hidden;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--grey-color);
  background: var(--white-color);
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table thead th,
.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody th {
  padding: 16px 20px !important;
  background: transparent !important;
  text-align: left !important;
  font-weight: 700;
  color: var(--darkgrey-color);
  border: none !important;
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table thead th {
  padding-top: 16px !important;
  padding-bottom: 12px !important;
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table thead th:nth-of-type(1),
.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table thead th:last-of-type,
.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody tr:last-of-type th:nth-of-type(1),
.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody tr:last-of-type th:last-of-type,
.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody tr:nth-of-type(1) th:nth-of-type(1),
.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody tr:nth-of-type(1) th:last-of-type {
  border-radius: 0 !important;
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody td {
  padding: 16px 20px !important;
  text-align: left !important;
  border: none !important;
  border-bottom: 1px solid var(--grey-color) !important;
  background: transparent !important;
  color: var(--darkgrey-color);
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody tr:last-child td,
.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody tr:last-child th {
  border-bottom: none !important;
}

.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap form,
.wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap form p {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  align-items: center;
}

.wps_rma_outer_wrap_info input.btn,
.wps_rma_outer_wrap_info input.button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: unset !important;
  margin: 0 8px 8px 0 !important;
  padding: 13px 20px !important;
  border-radius: 50px !important;
  border: 1px solid var(--red-color) !important;
  background: var(--red-color) !important;
  color: var(--white-color) !important;
  font-size: var(--font-size-body-bg, 18px) !important;
  font-weight: 400 !important;
  cursor: pointer;
  float: none !important;
  transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.wps_rma_outer_wrap_info input.btn:hover,
.wps_rma_outer_wrap_info input.button:hover {
  background: var(--darkred-color) !important;
  border-color: var(--darkred-color) !important;
}

/* Empty state text inside refund panel */
.wps_rma_refund_info_wrap.active-tab:not(:has(table)):not(:has(h2)) {
  font-size: 16px;
  line-height: 1.5;
}

/* =========================================
   Order messages (if present)
   ========================================= */

.wps_rma_order_msg_react_wrapper,
#wps_rma_order_msg_react {
  margin-top: 24px;
}

.wps-rma-order-msg-wrapper,
.wps_order_msg_sub_container {
  border: 1px solid var(--grey-color) !important;
  border-radius: 8px !important;
  background: var(--white-color) !important;
  box-shadow: none !important;
}

.wps-order-msg_column {
  background: var(--darkgrey-color) !important;
  color: var(--white-color) !important;
  border: none !important;
  border-radius: 8px 8px 0 0 !important;
}

#wps_order_new_msg,
.wps-rma-order-msg-wrapper textarea {
  border: 1px solid var(--grey-color) !important;
  border-radius: 16px !important;
  background: var(--white-color) !important;
  color: var(--darkgrey-color) !important;
  padding: 14px 20px !important;
}

.wps-order-msg-btn,
.wps_order_msg_att-wrap {
  border-radius: 50px !important;
  border: 1px solid var(--grey-color) !important;
  background: var(--light-color) !important;
}

/* =========================================
   RWD
   ========================================= */

@media (max-width: 1200px) {
  #primary.site-main:has(.wps_rma_refund_form_wrapper),
  #primary.site-main:has(.wps-rma-form__wrapper) {
    margin-bottom: 80px;
  }
}

@media (max-width: 1023px) {
  #primary.site-main:has(.wps_rma_refund_form_wrapper),
  #primary.site-main:has(.wps-rma-form__wrapper) {
    margin-top: 30px;
    margin-bottom: 60px;
  }

  .wps-rma-form__wrapper .wps-rma-form__heading {
    font-size: 16px !important;
    padding: 14px 16px !important;
  }

  .wps-rma-form__wrapper td,
  .wps-rma-form__wrapper th,
  .wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table thead th,
  .wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody th,
  .wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table tbody td {
    padding: 14px 12px !important;
  }

  .wps-rma-form__wrapper thead th,
  .wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table thead th {
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }

  /* Space under Quantity/Total headers → above .product-total price */
  .wps-rma-form__wrapper tbody td.product-total,
  .wps_rma_outer_wrap_info tbody td.product-total {
    padding: 28px 12px 14px !important;
    vertical-align: top !important;
  }

  .wps-rma-form__wrapper tbody td.product-quantity {
    padding-top: 20px !important;
  }

  .wps-rma-form__wrapper .wps-rma-refund-request__row,
  .wps-rma-form__wrapper .wps-rma-row__pd,
  .wps-rma-form__wrapper .wps_rma_refund_request__row,
  .wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap {
    padding: 16px !important;
  }

  .wps-rma-form__wrapper .wps_rma_customer_detail .woocommerce-columns {
    grid-template-columns: 1fr;
  }

  .wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .woocommerce-MyAccount-content input.btn.button[name='ced_new_return_request'],
  .woocommerce-MyAccount-content input.btn.button[name='wps_mra_return_request'],
  .woocommerce-MyAccount-content input.btn.button.wps_rma_view_order,
  .woocommerce-MyAccount-content .button.wps_rma_view_order,
  .woocommerce-orders-table__cell-order-actions .return,
  .woocommerce-orders-table__cell-order-actions .view_msg {
    width: 100% !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 768px) {
  .wps-rma-form__wrapper .wps-rma-product__table {
    min-width: 480px;
  }

  .wps-rma-form__wrapper .wps-rma-product__wrap {
    flex-direction: column;
    align-items: flex-start !important;
  }

  .wps-rma-form__wrapper .product-quantity input,
  .wps-rma-form__wrapper .wps_rma_return_product_qty {
    width: 72px !important;
    height: 40px !important;
  }

  .wps-rma-form__wrapper input.btn,
  .wps-rma-form__wrapper input.button,
  .wps-rma-form__wrapper input[name='wps_rma_return_request_submit'],
  .wps-rma-form__wrapper .wps_rma_return_request_morefiles,
  .wps_rma_outer_wrap_info input.btn,
  .wps_rma_outer_wrap_info input.button {
    width: 100% !important;
    margin-right: 0 !important;
  }

  .wps_rma_ul_wrap_info .wps_rma_li_wrap_info {
    flex: 1 1 auto;
  }

  .wps_rma_ul_wrap_info .wps_rma_li_wrap_info h2 {
    width: 100%;
    text-align: center;
    padding: 12px 14px !important;
    font-size: 14px !important;
  }

  .wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap h2 {
    font-size: 16px !important;
  }

  .wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap form,
  .wps_rma_outer_wrap_info .wps_rma_ret_ex_info_wrap form p {
    display: flex;
    width: 100%;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .wps-rma-form__wrapper .wps-rma-product__table {
    min-width: 420px;
  }

  .wps-rma-form__wrapper textarea,
  .wps-rma-form__wrapper input[type='text'],
  .wps-rma-form__wrapper select {
    font-size: 16px !important;
  }
}
