/* ONLINE PRICE MOBILE CUSTOMERS V1 */

@media (max-width: 700px) {

  table.op-mobile-client-table {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    table-layout: auto !important;
    border: 0 !important;
  }

  table.op-mobile-client-table thead {
    display: none !important;
  }

  table.op-mobile-client-table tbody {
    display: flex !important;
    flex-direction: column !important;
    gap: 9px !important;
    width: 100% !important;
  }

  table.op-mobile-client-table
  tr.op-mobile-client-row {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    background: #fff !important;
    border: 1px solid #c7dff4 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  table.op-mobile-client-table
  tr.op-mobile-client-row > td {
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border: 0 !important;
    background: transparent !important;
    overflow-wrap: anywhere !important;
  }

  table.op-mobile-client-table
  tr.op-mobile-client-row
  > td:first-child {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    padding: 12px !important;
    min-height: 58px !important;
  }

  .op-mobile-client-name {
    min-width: 0;
    flex: 1;
    font-size: 13px;
    font-weight: 750;
    color: #14345a;
    overflow-wrap: anywhere;
  }

  .op-mobile-client-tools {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 5px;
  }

  .op-mobile-vip {
    padding: 4px 6px;
    background: #e5f8e9;
    color: #087b35;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
  }

  .op-mobile-client-toggle {
    cursor: pointer;
    border: 1px solid #a9cdf0;
    background: #eef6ff;
    color: #0867ad;
    border-radius: 8px;
    padding: 8px 9px;
    font-size: 11px;
    font-weight: 750;
    min-height: 36px;
  }

  table.op-mobile-client-table
  tr.op-mobile-client-row:not(.op-mobile-client-open)
  > td:not(:first-child) {
    display: none !important;
  }

  table.op-mobile-client-table
  tr.op-mobile-client-open
  > td:not(:first-child) {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 6px !important;
    padding: 9px 12px !important;
    border-top: 1px solid #e4edf6 !important;
    text-align: left !important;
    white-space: normal !important;
    font-size: 12px !important;
    color: #193c61 !important;
  }

  table.op-mobile-client-table
  tr.op-mobile-client-open
  > td:not(:first-child)::before {
    content: attr(data-op-label);
    font-size: 10px;
    font-weight: 750;
    color: #67849e;
  }

  table.op-mobile-client-table
  tr.op-mobile-client-open
  > td:last-child {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    padding-bottom: 14px !important;
  }

  table.op-mobile-client-table
  tr.op-mobile-client-open
  > td:last-child::before {
    flex-basis: 100%;
  }

  table.op-mobile-client-table
  .crm-customer-actions button {
    max-width: 100% !important;
    white-space: normal !important;
    min-height: 36px;
  }
}

@media (min-width: 701px) {
  .op-mobile-client-tools {
    display: none !important;
  }
}


/* ONLINE PRICE COMPACT MOBILE ORDER ROWS V3 */
@media (max-width:700px) {
  #crmOrdersContent table.op-compact-order-history tbody {
    gap: 7px !important;
  }

  #crmOrdersContent table.op-compact-order-history tbody tr {
    display: block !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  #crmOrdersContent table.op-compact-order-history
  tbody tr > td:first-child {
    display: block !important;
    padding: 8px 10px !important;
    border: 0 !important;
  }

  #crmOrdersContent table.op-compact-order-history
  tbody tr > td:first-child::before {
    display: none !important;
    content: none !important;
  }

  #crmOrdersContent .op-order-summary {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    width: 100% !important;
    min-height: 34px !important;
  }

  #crmOrdersContent .op-order-date {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
    font-size: 12px;
    color: #173d60;
  }

  #crmOrdersContent .op-order-amount {
    flex: 0 0 auto;
    font-size: 13px;
    color: #0969b0;
  }

  #crmOrdersContent .op-order-expand {
    flex: 0 0 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 8px !important;
    border: 1px solid #bad8f2 !important;
    background: #edf6ff !important;
    color: #086aad !important;
    font-size: 21px !important;
    cursor: pointer;
  }

  #crmOrdersContent table.op-compact-order-history
  tbody tr:not(.op-order-open) > td:not(:first-child) {
    display: none !important;
  }

  #crmOrdersContent table.op-compact-order-history
  tbody tr.op-order-open > td:not(:first-child) {
    display: flex !important;
    width: 100% !important;
    padding: 9px 12px !important;
  }

  #crmOrdersContent table.op-compact-order-history
  tbody tr.op-order-open > td:nth-child(2) {
    border-top: 1px solid #e1ebf5 !important;
  }

  #crmOrdersContent table.op-compact-order-history
  tbody tr.op-order-open > td:last-child {
    border-bottom: 0 !important;
  }
}

@media (min-width:701px) {
  #crmOrdersContent .op-order-expand {
    display: none !important;
  }

  #crmOrdersContent .op-order-summary {
    display: contents !important;
  }

  #crmOrdersContent .op-order-amount {
    display: none !important;
  }
}


/* ONLINE PRICE MOBILE ORDER HISTORY FIX V4 */
@media (max-width:700px) {
  #crmCustomerOrders {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  #crmOrdersContent {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  #crmOrdersContent > table.crm-customer-table {
    display: none !important;
  }

  #crmOrdersContent .op-order-mobile-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  #crmOrdersContent .op-order-mobile-item {
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #c8def2 !important;
    border-radius: 10px !important;
    background: #fff !important;
    overflow: hidden !important;
  }

  #crmOrdersContent .op-order-mobile-summary {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    min-height: 45px !important;
    padding: 7px 9px !important;
    cursor: pointer !important;
    list-style: none !important;
  }

  #crmOrdersContent .op-order-mobile-summary::-webkit-details-marker {
    display: none !important;
  }

  #crmOrdersContent .op-order-mobile-date {
    min-width: 0 !important;
    flex: 1 1 auto !important;
    color: #173e64 !important;
    font-size: 12px !important;
    white-space: nowrap !important;
  }

  #crmOrdersContent .op-order-mobile-amount {
    flex: 0 0 auto !important;
    color: #096bad !important;
    font-size: 13px !important;
    white-space: nowrap !important;
  }

  #crmOrdersContent .op-order-mobile-arrow {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 30px !important;
    border: 1px solid #bfdaf1 !important;
    border-radius: 7px !important;
    background: #edf6ff !important;
    color: #086aad !important;
    font-size: 20px !important;
  }

  #crmOrdersContent .op-order-mobile-item[open]
  .op-order-mobile-arrow {
    transform: rotate(180deg);
  }

  #crmOrdersContent .op-order-mobile-details {
    padding: 5px 10px 10px !important;
    border-top: 1px solid #e3edf6 !important;
  }

  #crmOrdersContent .op-order-mobile-field {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: space-between !important;
    gap: 12px !important;
    padding: 8px 0 !important;
    border-bottom: 1px solid #edf2f8 !important;
    font-size: 12px !important;
  }

  #crmOrdersContent .op-order-mobile-field:last-child {
    border-bottom: 0 !important;
  }

  #crmOrdersContent .op-order-mobile-label {
    color: #607d98 !important;
    flex: 0 0 38% !important;
  }

  #crmOrdersContent .op-order-mobile-value {
    min-width: 0 !important;
    color: #173e64 !important;
    text-align: right !important;
    overflow-wrap: anywhere !important;
  }
}

@media (min-width:701px) {
  #crmOrdersContent .op-order-mobile-list {
    display: none !important;
  }
}
