.wrap .wp-heading-inline {
  font-size: 30px;
  font-weight: 500;
  color: #2d3859;
}

.wrap .bulkactions .button,
.orders-button {
  font-size: 17px;
  font-weight: 500;
  border-radius: 4px;
  background: #00b887;
  border-color: #00b887;
  color: white;
  text-align: center;
  line-height: 0;
}

.primary-button {
  margin-top: 20px;
  font-size: 17px;
  font-weight: 500;
  border-radius: 4px;
  background: #00b887;
  border-color: #00b887;
  color: white;
  text-align: center;
  padding: 10px;
}

.danger-button {
  font-size: 17px;
  font-weight: 500;
  border-radius: 4px;
  background: #ce0606;
  border-color: #ce0606;
  color: white;
  text-align: center;
  line-height: 0;
}

.order-status {
  font-weight: 500;
}

.post-type-shop_order .wp-list-table tbody .column-bosta_tracking_number {
  font-weight: bold;
  color: #2d3859;
}

.post-type-shop_order .wp-list-table tbody .column-bosta_sync_status {
  text-align: center;
  overflow: visible;
}

.post-type-shop_order
  .wp-list-table
  tbody
  .column-bosta_sync_status
  .bosta-status-badge {
  cursor: help;
}

/* Modern Status Badge Styles for Bosta Sync Status */
.bosta-sync-status-wrapper {
  position: relative;
  display: inline-block;
  overflow: visible;
}

.bosta-status-badge {
  display: flex;
  padding: 2px 8px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  text-transform: uppercase;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
  line-height: 18px;
  border: 1px solid transparent;
  border-radius: 200px;
}

.bosta-status-badge i {
  font-size: 12px;
  font-style: normal;
  line-height: 1;
}

.bosta-status-text {
  font-size: 10px;
  font-weight: 600;
}

/* Success Status */
.bosta-status-success {
  background-color: #ecfdf3;
  color: #039855;
  border-color: #d1fadf;
}

/* Failed Status */
.bosta-status-failed {
  background-color: #fee4e2;
  color: #b42318;
  border-color: #ffcdca;
}

/* Processing Status */
.bosta-status-processing {
  background-color: #fffaeb;
  color: #dc6803;
  border-color: #fef0c7;
}

/* None/Not Synced Status */
.bosta-status-none {
  background-color: #f2f4f7;
  color: #111619;
  border-color: #e4e7ec;
}

.woocommerce_page_wc-orders .wp-list-table th.column-order_date,
.woocommerce_page_wc-orders .wp-list-table td.column-order_date {
  width: 100px;
}

.post-type-shop_order .wp-list-table th.column-bosta_customer_info,
.post-type-shop_order .wp-list-table td.column-bosta_customer_info {
  width: 180px;
}

.wrap .widefat thead tr th,
.wrap .widefat tfoot tr th,
.tracking_title,
.timeline_title {
  color: #2d3859;
  font-size: 15px;
  font-weight: 500;
}

.timeline_title {
  font-size: 13px;
}

.wrap .widefat thead tr th span {
  text-align: center;
}

.search-box input[name="s"] {
  min-height: 34px;
}

.wp-core-ui .search-box .button {
  height: 34px;
  font-size: 15px;
}

.wc-backbone-modal.wc-order-preview .wc-backbone-modal-content {
  min-width: 75vw !important;
}

.pickups-table {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #858181;
  width: 75vw;
  border-radius: 8px;
  padding: 10px;
  margin: 10px;
}
.pickups-table td,
.pickups-table th {
  text-align: left;
  padding: 5px;
  border-radius: 8px;
}

.pickups-table th,
.pickups-table td {
  border-radius: 0;
  border-bottom: 1px solid #858181;
}

.tablenav .no-pages {
  display: block !important;
}

.subtext {
  font-size: 10px;
  color: #718096;
}

.wrap div.error-note {
  background-color: #ce0606;
  color: white;
  border-radius: 8px;
}

.wrap div.error-note p {
  font-size: 15px;
  font-weight: 400;
}

.wrap .tablenav .actions {
  float: none;
  margin: 12px 0;
  width: 100%;
  padding: 0px;
}

.wrap .tablenav .bosta_custom_buttons_div {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  width: 100%;
}

.wrap .tablenav .bosta_custom_buttons_div .rightDiv,
.wrap .tablenav .bosta_custom_buttons_div .leftDiv {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 10px;
}

.wrap .tablenav .bosta_custom_button {
  height: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.wrap .tablenav .bosta_custom_buttons_div .refreshIcon {
  height: 17px;
  width: 20px;
  margin-right: 10px;
}

.wrap .tablenav .bosta_custom_p {
  font-size: 14px;
  font-weight: 600;
  margin: 0;
  margin-bottom: 4px;
}

.bosta_status_search_tags {
  margin-bottom: 8px;
  display: flex;
  gap: 10px;
  width: 100%;
  font-weight: 600;
  align-items: center;
}

/* Select dropdown styling */
.bosta-filter-select {
  border-radius: 5px;
  background-color: white;
  color: #333;
  border: 1px solid #ddd;
  padding: 8px 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  min-width: 180px;
  font-size: 14px;
}

.bosta-filter-select:hover {
  border-color: #007cba;
}

.bosta-filter-select:focus {
  outline: none;
  border-color: #007cba;
  box-shadow: 0 0 0 1px #007cba;
}

/* Filter button styling */
.bosta-filter-button {
  border-radius: 5px;
  background: #00b887;
  border-color: #00b887;
  color: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.bosta-filter-button:hover {
  background-color: #008060;
}

.bosta-filter-button:active {
  background-color: #004a73;
}

/* Clear button styling */
.bosta-clear-button {
  border-radius: 5px;
  background-color: #6c757d;
  color: white;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 14px;
  font-weight: 500;
}

.bosta-clear-button:hover {
  background-color: #5a6268;
}

.bosta-clear-button:active {
  background-color: #495057;
}

.container-div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: left;
  margin: 2rem;
  padding: 1.5rem;
  border-radius: 0.4rem;
  border: 1px solid #858181;
}

.table-title,
.wc-order-preview-address h2,
.wc-order-preview-note strong:first-child {
  font-size: 22px !important;
  margin: 0px 0px 2rem 0px;
}

.timeline-table {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.timeline-next-action {
  margin-top: 2rem;
}

.timeline-entry {
  display: flex;
  margin: 0.5rem;
  width: 100%;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: center;
}

.entry-progress {
  width: 100%;
  display: flex;
  gap: 0.5rem;
  justify-content: left;
  align-items: center;
}

.entry-data {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  justify-content: center;
  align-items: left;
}

.status_done {
  height: 8px;
  width: 8px;
  background-color: #00b887;
  border-radius: 50%;
  display: inline-block;
}

.status_done_line {
  height: 5px;
  width: 100%;
  background-color: #00b887;
  border-radius: 5px;
  display: inline-block;
}

.status_not_done_line {
  height: 5px;
  width: 100%;
  background-color: #bbb;
  border-radius: 5px;
  display: inline-block;
}

.status_not_done {
  height: 8px;
  width: 8px;
  background-color: #bbb;
  border-radius: 50%;
  display: inline-block;
}

.data-title {
  font-size: 15px;
  font-weight: bold;
}

.data-date {
  font-size: 12px;
}

.next-action-title {
  font-size: 15px;
  font-weight: bold;
  margin-right: 0.3rem;
}

.container-table {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.cell {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid #ddd;
  border-radius: 5px;
}

.cell-header {
  position: relative;
  cursor: pointer;
  width: 50%;
  font-size: 15px;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.cell-header[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 0;
  padding: 0.5rem;
  background-color: #00b887;
  opacity: 0.9;
  color: #fff;
  border-radius: 5px;
  white-space: wrap;
  font-size: 10px;
  z-index: 100;
  transition: opacity 0.3s ease;
}

.cell-data {
  font-size: 14px;
}

.wc-order-preview-addresses {
  display: flex;
  flex-direction: row;
  justify-content: center;
  margin: 2rem;
  gap: 1rem;
}

.wc-order-preview-address,
.wc-order-preview-note {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1rem !important;
  border-radius: 8px;
  border: 1px solid #858181;
}

.wc-order-preview-address a {
  color: black;
  text-decoration: none;
  margin: 0.3rem;
}

@media (max-width: 782px) {
  .wrap .tablenav .view-switch,
  .tablenav.top .actions {
    display: block;
  }
  .wrap .tablenav .bosta_custom_buttons_div {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
    gap: 10px;
  }
  .wrap .tablenav .bosta_custom_buttons_div .rightDiv,
  .wrap .tablenav .bosta_custom_buttons_div .leftDiv {
    display: flex;
    flex-direction: column;
    width: 100%;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
  .wrap .tablenav .bosta_custom_button {
    width: 100%;
  }
  .wrap .tablenav .bosta_status_search_tags {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .wrap .tablenav .bosta-filter-select {
    width: 100%;
    margin-bottom: 5px;
  }
  .wrap .tablenav .bosta-filter-button,
  .wrap .tablenav .bosta-clear-button {
    width: 100%;
    margin-bottom: 5px;
  }
  .container-div {
    margin: 1.5rem;
  }
  .table-title,
  .wc-order-preview-address h2,
  .wc-order-preview-note strong:first-child {
    font-size: 18px !important;
    margin: 0px 0px 1.5rem 0px;
  }
  .timeline-table {
    flex-direction: column;
    gap: 1rem;
  }
  .entry-data {
    flex-direction: row;
    justify-content: space-between;
  }
  .container-table {
    grid-template-columns: 1fr;
  }
  .wc-order-preview-addresses {
    margin: 1.5rem;
    flex-direction: column;
  }
  .wc-order-preview-address,
  .wc-order-preview-note {
    width: 100% !important;
  }
}

/* Customer Info Display Styles */
.bosta-customer-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.bosta-customer-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 24px;
  max-height: 24px;
  padding: 8px;
  border-radius: 50%;
}

.bosta-high-rate .bosta-customer-icon {
  background-color: #d1fadf;
}

.bosta-average-rate .bosta-customer-icon {
  background-color: #fef0c7;
}

.bosta-low-rate .bosta-customer-icon {
  background-color: #fee4e2;
}

.bosta-new-customer .bosta-customer-icon {
  background-color: #f2f4f7;
}

.bosta-customer-icon svg {
  width: 16px;
  height: 16px;
}

.bosta-customer-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.bosta-customer-phone {
  font-weight: 500;
  color: #111619;
  font-size: 14px;
  line-height: 22px;
}

.bosta-customer-rate {
  font-size: 12px;
  line-height: 18px;
  font-weight: 500;
  line-height: 1.2;
}

.bosta-no-phone {
  color: #9ca3af;
  font-style: italic;
  font-size: 13px;
}

/* Orders without ranking data - just show phone number */
.bosta-customer-info.bosta-no-ranking {
  gap: 0;
}

.bosta-customer-info.bosta-no-ranking .bosta-customer-details {
  gap: 0;
}

/* Success Rate Categories */
.bosta-high-rate .bosta-customer-rate {
  color: #10b981;
}

.bosta-average-rate .bosta-customer-rate {
  color: #f59e0b;
}

.bosta-low-rate .bosta-customer-rate {
  color: #ef4444;
}

.bosta-new-customer .bosta-customer-rate {
  color: #6b7280;
}

/* Responsive adjustments for customer info */
@media (max-width: 768px) {
  .bosta-customer-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .bosta-customer-details {
    gap: 1px;
  }

  .bosta-customer-phone {
    font-size: 12px;
  }

  .bosta-customer-rate {
    font-size: 10px;
  }

  .bosta-customer-icon {
    width: 14px;
    height: 14px;
  }

  /* Responsive column widths for mobile */
  .post-type-shop_order .wp-list-table th.column-bosta_customer_info,
  .post-type-shop_order .wp-list-table td.column-bosta_customer_info,
  .woocommerce_page_wc-orders .wp-list-table th.column-bosta_customer_info,
  .woocommerce_page_wc-orders .wp-list-table td.column-bosta_customer_info {
    width: 150px;
  }

  .post-type-shop_order .wp-list-table th.column-bosta_tracking_number,
  .post-type-shop_order .wp-list-table td.column-bosta_tracking_number,
  .woocommerce_page_wc-orders .wp-list-table th.column-bosta_tracking_number,
  .woocommerce_page_wc-orders .wp-list-table td.column-bosta_tracking_number {
    width: 120px;
  }
}

.bosta-toast {
  position: fixed;
  top: 45px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: #d1fadf;
  color: #027a48;
  padding: 4px;
  border-radius: 16px;
  z-index: 100000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bosta-toast .bosta-toast-tag {
  padding: 2px 8px;
  background-color: #ecfdf3;
  border: 1px solid #d1fadf;
  border-radius: 200px;
}

.bosta-toast .bosta-toast-tag-error {
  background-color: #fee4e2;
  border: 1px solid #ffcdca;
}

.bosta-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.bosta-toast.bosta-toast-error {
  background: #ffcdca;
  color: #b42318;
}
