/*
 * Global Kasair customer picker
 *
 * The cashier customer modal is the visual source of truth. The selectors cover
 * both the current #modalCustomer name and the older #modalSelectCustomer name
 * so feature pages do not need to maintain their own modal skin.
 */
:root {
  --customer-picker-ink: #172238;
  --customer-picker-muted: #5f6d84;
  --customer-picker-line: #dce2eb;
  --customer-picker-canvas: #f7f8fa;
  --customer-picker-surface: #ffffff;
  --customer-picker-navy: #101c35;
  --customer-picker-pink: #e61e6e;
}

.kasair-customer-picker .modal-dialog {
  width: calc(100vw - 64px) !important;
  max-width: 1240px !important;
  height: calc(100vh - 32px) !important;
  max-height: none !important;
  margin: 16px auto !important;
}

.kasair-customer-picker .modal-content {
  width: 100%;
  height: 100% !important;
  max-height: 100% !important;
  overflow: hidden;
  border: 0 !important;
  border-radius: 16px !important;
  background: var(--customer-picker-canvas) !important;
  box-shadow: 0 28px 80px rgba(8, 18, 35, .26) !important;
}

.kasair-customer-picker .modal-header {
  min-height: 70px;
  flex: 0 0 auto;
  align-items: center;
  padding: 12px 18px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--customer-picker-line) !important;
  background: var(--customer-picker-surface) !important;
}

.kasair-customer-picker .modal-title {
  margin: 0;
  color: var(--customer-picker-ink);
  font-size: 22px !important;
  font-weight: 700;
  line-height: 1.35;
}

.kasair-customer-picker .modal-header .close {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  border: 0;
  border-radius: 10px;
  background: #f1f3f6;
  color: var(--customer-picker-ink);
  font-size: 23px;
  opacity: 1;
}

.kasair-customer-picker .modal-header .close:hover,
.kasair-customer-picker .modal-header .close:focus {
  background: #e7eaf0;
  color: var(--customer-picker-ink);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(16, 28, 53, .12);
}

.kasair-customer-picker .modal-body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto !important;
  padding: 14px 16px 18px !important;
  background: var(--customer-picker-canvas) !important;
  scrollbar-color: #c3cad5 transparent;
  scrollbar-width: thin;
}

.kasair-customer-picker .nav-tabs {
  gap: 6px;
  margin-bottom: 14px !important;
  padding: 5px;
  border: 1px solid var(--customer-picker-line);
  border-radius: 11px;
  background: var(--customer-picker-surface);
}

.kasair-customer-picker .nav-tabs .nav-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 0 !important;
  border-radius: 9px;
  color: #56647a !important;
  font-size: 14px;
  font-weight: 600;
}

.kasair-customer-picker .nav-tabs .nav-link.active {
  background: var(--customer-picker-navy) !important;
  color: #fff !important;
  box-shadow: 0 5px 12px rgba(16, 28, 53, .16);
}

.kasair-customer-picker-toolbar {
  display: flex !important;
  align-items: flex-end !important;
  justify-content: space-between !important;
  gap: 20px;
  margin: 0 0 14px !important;
  padding: 13px 14px;
  border: 1px solid var(--customer-picker-line);
  border-radius: 11px;
  background: var(--customer-picker-surface);
}

.kasair-customer-picker-copy {
  min-width: 240px;
}

.kasair-customer-picker-copy strong,
.kasair-customer-picker-copy span {
  display: block;
}

.kasair-customer-picker-copy strong {
  color: var(--customer-picker-ink);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.kasair-customer-picker-copy span {
  margin-top: 3px;
  color: var(--customer-picker-muted);
  font-size: 13px;
  line-height: 1.5;
}

.kasair-customer-picker-search {
  width: 430px !important;
  max-width: 100%;
  flex: 0 0 430px !important;
  display: block !important;
}

.kasair-customer-picker-search-label {
  display: block;
  margin: 0 0 6px;
  color: #344157;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.kasair-customer-picker-search .input-group,
.kasair-customer-picker-search > div,
.kasair-customer-picker-search-controls {
  width: 100%;
}

.kasair-customer-picker-search-controls {
  display: flex;
  align-items: stretch;
}

.kasair-customer-picker-search-controls input {
  min-width: 0;
  flex: 1 1 auto;
}

.kasair-customer-picker-search input {
  width: 100%;
  height: 44px !important;
  margin: 0 !important;
  padding: 9px 14px !important;
  border: 1px solid #d6dce5 !important;
  border-radius: 10px 0 0 10px !important;
  background: #fff !important;
  color: var(--customer-picker-ink) !important;
  font-size: 14px !important;
  box-shadow: none !important;
}

.kasair-customer-picker-search input:focus {
  position: relative;
  z-index: 3;
  border-color: var(--customer-picker-navy) !important;
  box-shadow: 0 0 0 3px rgba(16, 28, 53, .1) !important;
}

.kasair-customer-picker-search .btn {
  width: 46px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #d6dce5 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.kasair-customer-picker-search .kasair-customer-picker-search-button {
  background: var(--customer-picker-navy) !important;
  border-color: var(--customer-picker-navy) !important;
  color: #fff !important;
}

.kasair-customer-picker-search .kasair-customer-picker-reset-button {
  border-radius: 0 10px 10px 0 !important;
  background: #fff !important;
  color: #d93656 !important;
}

.kasair-customer-picker-search .btn img {
  width: 18px;
  height: 18px;
  filter: brightness(0) invert(1);
}

.kasair-customer-picker-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--customer-picker-line);
  border-radius: 11px;
  background: var(--customer-picker-surface);
}

.kasair-customer-picker table,
.kasair-customer-picker table.dataTable {
  width: 100% !important;
  margin: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0;
  color: #344157;
}

.kasair-customer-picker table thead th {
  height: 48px;
  padding: 12px 13px !important;
  vertical-align: middle !important;
  border: 0 !important;
  border-bottom: 1px solid #dce1e9 !important;
  background: #eef1f5 !important;
  color: #303d52 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  white-space: nowrap;
}

.kasair-customer-picker table tbody td {
  min-height: 56px;
  padding: 13px !important;
  vertical-align: middle !important;
  border-top: 1px solid #edf0f4 !important;
  background: #fff !important;
  color: #344157;
  font-size: 14px;
  line-height: 1.45;
}

.kasair-customer-picker table tbody tr:hover td {
  background: #fff7fa !important;
}

.kasair-staff-picker .image-container > div {
  width: 40px !important;
  height: 40px !important;
  overflow: hidden;
  border: 1px solid var(--customer-picker-line);
  border-radius: 50%;
  background: #f1f3f6;
}

.kasair-staff-picker .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kasair-staff-picker table tbody td:last-child .btn {
  min-width: 78px;
}

.kasair-customer-picker table th:last-child,
.kasair-customer-picker table td:last-child {
  text-align: right;
}

.kasair-customer-picker table td:last-child > .d-flex {
  justify-content: flex-end !important;
}

.kasair-customer-picker table tbody td:last-child .btn,
.kasair-customer-picker .btn-check-customer,
.kasair-customer-picker .btn-check-order-type-customer {
  min-width: 78px;
  min-height: 38px;
  padding: 8px 16px;
  border: 0 !important;
  border-radius: 8px !important;
  background: var(--customer-picker-pink) !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700;
}

.kasair-customer-picker .dataTables_info,
.kasair-customer-picker .dataTables_length,
.kasair-customer-picker .dataTables_filter {
  color: var(--customer-picker-muted);
  font-size: 12px;
}

.kasair-customer-picker .dataTables_paginate {
  padding: 12px 8px 8px;
}

.kasair-customer-picker .page-link,
.kasair-customer-picker .paginate_button {
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px !important;
}

.kasair-customer-picker .create-new-mode,
.kasair-customer-picker #new {
  max-width: 760px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid var(--customer-picker-line);
  border-radius: 12px;
  background: #fff;
}

.kasair-customer-picker .cashier-new-customer-intro {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--customer-picker-line);
}

.kasair-customer-picker .cashier-new-customer-intro > i {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  background: #fff0f6;
  color: var(--customer-picker-pink);
}

.kasair-customer-picker .cashier-new-customer-intro strong,
.kasair-customer-picker .cashier-new-customer-intro span {
  display: block;
}

.kasair-customer-picker .cashier-new-customer-intro strong {
  color: var(--customer-picker-ink);
  font-size: 16px;
}

.kasair-customer-picker .cashier-new-customer-intro span {
  margin-top: 3px;
  color: var(--customer-picker-muted);
  font-size: 13px;
}

.kasair-customer-picker .cashier-new-customer-actions {
  gap: 8px;
  margin-top: 20px;
}

.kasair-customer-picker .membership-customer-picker-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--customer-picker-line);
  border-radius: 11px;
  background: var(--customer-picker-surface);
}

.kasair-customer-picker .membership-customer-picker-help {
  color: var(--customer-picker-muted);
  font-size: 13px;
  line-height: 1.5;
}

.kasair-customer-picker .btn-confirm-selected-customer {
  min-height: 42px;
  flex: 0 0 auto;
  padding: 9px 18px;
  border: 0;
  border-radius: 9px;
  background: var(--customer-picker-pink) !important;
  color: #fff !important;
  font-size: 13px;
  font-weight: 700;
}

.kasair-customer-picker .badge {
  padding: 5px 8px;
  border: 1px solid #dce2eb;
  border-radius: 999px;
  background: #f4f6f8;
  color: var(--customer-picker-muted);
  font-size: 11px;
  font-weight: 600;
}

.kasair-customer-picker .create-new-mode .kasair-input-neutral-10,
.kasair-customer-picker #new .form-control {
  width: 100%;
  min-height: 44px;
  border-radius: 9px;
}

@media (max-width: 767.98px) {
  .kasair-customer-picker .modal-dialog {
    width: calc(100vw - 16px) !important;
    height: calc(100vh - 16px) !important;
    margin: 8px auto !important;
  }

  .kasair-customer-picker .modal-header {
    min-height: 60px;
    padding: 10px 12px !important;
  }

  .kasair-customer-picker .modal-title {
    font-size: 19px !important;
  }

  .kasair-customer-picker .modal-body {
    padding: 10px !important;
  }

  .kasair-customer-picker-toolbar {
    align-items: stretch !important;
    flex-direction: column;
    gap: 12px;
  }

  .kasair-customer-picker-search {
    width: 100% !important;
    flex-basis: auto !important;
  }

  .kasair-customer-picker table {
    min-width: 720px;
  }

  .kasair-customer-picker .membership-customer-picker-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .kasair-customer-picker .btn-confirm-selected-customer {
    width: 100%;
  }
}
