/* Main table container */
.user_order_container {
  padding: 40px 100px 100px 100px;
  min-height: 500px;
}

/* Mobile */
.mobile_orders,
.mobile_history {
  display: none;
}

/* All text in table */
.order_table .body3,
.history_order_table .body3 {
  font-weight: 500;
}

/* Connect payments row */
.connect_payments {
  width: 120px;
}

/* Order pagination div */
.order_pagination_div {
  display: flex;
  justify-content: center;
  margin-top: 50px;
}

/* Pagination numbers */
.order_pagination_div .page-numbers.current,
.order_pagination_div a.page-numbers {
  width: 45px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.order_pagination_div .page-numbers {
  border: 1px solid var(--grey4);
  font-size: 14px;
  line-height: 21px;
  font-weight: 500;
}

/* Pagination dots */
.page-numbers.dots {
  display: grid;
  place-items: end;
  border: none;
}

/* Connect payments checkbox */
.connect_payments input {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

/* Text in order table (except header) */
.order_table td.body3 {
  color: var(--grey1);
}

/* Text in order table, when checkbox checked */
tr:has(.checkbox_checked) .body3 {
  color: black;
}

/* History container */
.desktop_history {
  margin-top: 60px;
}

/* History container  title*/
.desktop_history .h3 {
  margin-bottom: 30px;
  color: var(--purple1);
}

/* Pay for orders button */
#pay-for-orders {
  margin-top: 20px;
}

/* Action buttons wrapper */
.orders_action_buttons {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.orders_action_hint {
  margin-top: 10px;
  color: var(--grey1);
}

/* Action buttons */
#pay-for-orders,
#merge-orders {
  margin-top: 0;
}

/* Merge action button uses brand purple when active */
#merge-orders.main-button.red_button,
#merge-orders-mobile.main-button.red_button {
  background-color: var(--purple1);
}

#merge-orders.main-button.red_button:hover,
#merge-orders-mobile.main-button.red_button:hover {
  background-color: var(--purple2);
}

/* Checkbox row */
td.connect_payments {
  text-align: center;
}

/* Header row of table */
.order_table tr:first-child,
.history_order_table tr:first-child {
  height: 61px;
}

/* All table rows (except header) */
.order_table tr,
.history_order_table tr {
  height: 71px;
}

/* Generate bill for user div */
.history_generate_bill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 71px;
}

/* Generate bill for user button */
.history_generate_bill button {
  display: flex;
  gap: 7px;
  background-color: inherit;
  border: none;
  color: var(--purple1);
  font-family: 'Poppins';
  cursor: pointer;
  padding-left: 10px;
}

/* Price cell */
.user_order_price {
  white-space: nowrap;
}

/* "Pay" button */
td .red_button {
  width: 100%;
  height: 41px;
}

/* Pop up message */
#informational-modal,
#informational-modal-merge-error,
#informational-modal-combined-merge-error,
#informational-modal-too-many-orders {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  border-radius: 5px;
  background-color: #ffffff;
  z-index: 9;
  padding: 30px;
  max-width: 400px;
  transition: 200ms ease-in-out;
}
/* Pop up message (active) */
#informational-modal.active-overlay,
#informational-modal-merge-error.active-overlay,
#informational-modal-combined-merge-error.active-overlay,
#informational-modal-too-many-orders.active-overlay {
  transform: translate(-50%, -50%) scale(1);
}
/* Overlay */
#informational-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #1a202c;
  opacity: 0;
  z-index: 8;
  pointer-events: none;
  transition: 200ms ease-in-out;
}
/* Overlay (active) */
#informational-modal-overlay.active-overlay {
  opacity: 0.9;
  pointer-events: all;
}
/* Logo (in pop up message) */
#informational-modal img,
#informational-modal-merge-error img,
#informational-modal-combined-merge-error img,
#informational-modal-too-many-orders img {
  margin-bottom: 40px;
  width: 190px;
  height: 40px;
}
/* Informational text ( in pop up message ) */
.informational-modal-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
/* Return deposit button */
.modal-continue-with-payment {
  border: none;
  width: 100%;
}
/* Return deposit button */
.modal-continue-with-payment .main-button {
  max-width: unset;
}
/* Informational text ( in pop up message ) */
.informational-modal-info span,
.informational-modal-info h3 {
  text-align: center;
  text-wrap: balance;
}
/* Close button (in pop up message) */
#informational-modal .close-button,
#informational-modal-merge-error .close-button,
#informational-modal-combined-merge-error .close-button,
#informational-modal-too-many-orders .close-button {
  position: absolute;
  top: 20px;
  right: 20px;
  height: 14px;
  width: 14px;
  cursor: pointer;
  border: none;
  background-color: inherit;
}
/* Close button image (pop up) */
#informational-modal .close-button img,
#informational-modal-merge-error .close-button img,
#informational-modal-combined-merge-error .close-button img,
#informational-modal-too-many-orders .close-button img {
  height: 14px;
  width: 14px;
  margin-bottom: 0px;
}

@media screen and (max-width: 1100px) {
  /* Main table container */
  .user_order_container {
    padding: 30px 50px 50px 50px;
  }
}

@media screen and (max-width: 998px) {
  /* Return deposit button */
  #informational-modal .modal-continue-with-payment #continue-with-payment {
    height: 45px;
    visibility: visible;
    opacity: 1;
    border-radius: 5px;
    justify-content: center;
    font-size: 16px;
  }
}

@media screen and (max-width: 900px) {
  .user_order_container {
    padding: 0px 50px 50px 50px;
  }

  /* Mobile */
  .mobile_orders,
  .mobile_history {
    display: block;
  }

  /* Desktop */
  .desktop_orders,
  .desktop_history {
    display: none;
  }

  /* Order history container */
  .mobile_history {
    margin-top: 50px;
  }

  /* Pay for orders button */
  #pay-for-orders-mobile,
  #merge-orders-mobile {
    margin-top: 10px;
    width: 100%;
  }

  .orders_action_buttons {
    flex-direction: column;
    gap: 0;
    margin-top: 0;
  }

  .orders_action_hint {
    margin-top: 8px;
  }

  /* "Information" title */
  .mobile_history .h5 {
    border-bottom: 2px solid var(--purple1);
    -o-border-image: linear-gradient(
        to right,
        var(--purple1) 50%,
        transparent 50%
      )
      100% 1;
    border-image: linear-gradient(to right, var(--purple1) 50%, transparent 50%)
      100% 1;
    padding-bottom: 10px;
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    font-size: 24px;
    font-weight: 600;
  }

  /* Accordion item */
  .mobile_order_accordion {
    width: 100%;
  }

  /* Accordion title */
  .order_accordion_title {
    padding: 10px 20px;
    background-color: var(--purple1);
    height: 45px;
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
    gap: 15px;
  }

  /* Order accordion title */
  .order_accordion_title .body4 {
    color: white;
    font-weight: 400;
  }

  /* order accordion title text */
  .order_accordion_title:after {
    content: url('/wp-content/themes/lenkijoje-pigiau/assets/icons/arrow_icon_down_white.png');
    position: absolute;
    right: 20px;
    top: 45%;
  }

  /* order accordion title icon */
  .order_accordion_title:has(+ .active_order_show):after {
    transform: rotate(180deg);
    margin-top: -2px;
  }

  /* Expanded accordion */
  .order_accordion_expanded {
    padding: 15px 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-right: 1px solid var(--grey2);
    border-left: 1px solid var(--grey2);
    border-bottom: 1px solid var(--grey2);
  }

  /* All accordions */
  .order_accordion_expanded div {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  /* payment button */
  .order_accordion_expanded .red_button {
    width: 100%;
    height: 45px;
  }

  /* Expanded accordion values */
  .order_accordion_expanded .body3 {
    font-weight: 500;
  }

  /* Expanded accordion titles */
  .order_accordion_expanded .caption4 {
    color: var(--grey1);
    font-weight: 500;
  }

  /* Expanded accordion */
  .order_accordion_expanded_wrapper {
    opacity: 0;
    max-height: 0px;
    transition: max-height 0.6s, opacity 0.2s ease;
    pointer-events: none;
  }

  /* Accordion collapsed state */
  .order_accordion_expanded_wrapper.active_order_show {
    opacity: 1;
    height: -webkit-fit-content;
    height: -moz-fit-content;
    height: fit-content;
    max-height: 315px;
    transition: max-height 0.6s, opacity 1.4s ease;
    pointer-events: all;
  }

  /* Generate bill div (mobile) */
  .order_accordion_expanded div .history_generate_bill {
    flex-direction: row;
    height: unset;
  }

  /* Generate bill text (mobile) */
  .order_accordion_expanded div .history_generate_bill button {
    color: black;
  }

  /* All orders accordion wrapper */
  .all_orders_accordion {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }

  /* Order checkbox */
  .order_accordion_title input[type='checkbox'] {
    width: 20px;
    height: 20px;
    margin-top: -4px;
  }

  /* Mobile accordion checkbox */
  .order_accordion_title input[type='checkbox'] {
    position: relative;
    cursor: pointer;
  }

  /* Mobile accordion checkbox */
  .order_accordion_title input[type='checkbox']:before {
    content: '';
    display: block;
    position: absolute;
    width: 20px;
    height: 20px;
    top: 0;
    left: 0;
    border: 1px solid white;
    border-radius: 3px;
    background-color: var(--purple1);
    padding: 1px;
  }

  /* Mobile accordion checkbox */
  .order_accordion_title input[type='checkbox']:checked::before {
    background-color: var(--purple1);
  }

  /* Mobile accordion checkbox */
  .order_accordion_title input[type='checkbox']:checked::after {
    content: '';
    display: block;
    width: 5px;
    height: 10px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    position: absolute;
    top: 4px;
    left: 9px;
  }
}

@media screen and (max-width: 767px) {
  /* Main table container */
  .user_order_container {
    padding: 0px 15px 50px 15px;
  }

  /* "Information" title */
  .mobile_history .h5 {
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
  }

  /* overlay (pop up) */
  #informational-modal-overlay {
    z-index: 10;
  }
  /* Pop up message */
  #informational-modal,
  #informational-modal-merge-error,
  #informational-modal-combined-merge-error,
  #informational-modal-too-many-orders {
    z-index: 11;
  }
}

@media screen and (max-width: 479px) {
  /* Pagination elements */
  .order_pagination_div .page-numbers.current,
  .order_pagination_div a.page-numbers {
    width: 40px;
    height: 40px;
  }

  /* Pagination previous + next buttons */
  .order_pagination_div a.prev.page-numbers,
  .order_pagination_div a.next.page-numbers {
    padding: 5px 5px;
  }

  /* Pagination div */
  .order_pagination_div {
    margin-top: 60px;
  }

  /* Logo (pop up message) */
  #informational-modal img,
  #informational-modal-merge-error img,
  #informational-modal-combined-merge-error img,
  #informational-modal-too-many-orders img {
    margin-bottom: 30px;
    width: 165px;
    height: 35px;
  }
  /* Pop up message */
  #informational-modal,
  #informational-modal-merge-error,
  #informational-modal-combined-merge-error,
  #informational-modal-too-many-orders {
    width: 310px;
    padding: 25px 20px;
  }
  /* Informational text (pop up) */
  .informational-modal-info {
    margin-bottom: 20px;
  }
  /* Close button (pop up) */
  #informational-modal .close-button,
  #informational-modal-merge-error .close-button,
  #informational-modal-combined-merge-error .close-button,
  #informational-modal-too-many-orders .close-button {
    top: 14px;
    right: 14px;
  }
}
