/* Picking lists: create / edit / view — typeahead + layout */

/*
 * InputFactory appendMenuToBody moves the dropdown to document.body (escapes overflow in portlets/repeaters).
 * Those nodes are not under .picking-list-edit-page, so page-local .tt-menu rules do not apply.
 * Global index loads this file — keep selectors scoped to [data-tt-body-ns] only.
 */
body > .tt-menu[data-tt-body-ns],
body > .tt-dropdown-menu[data-tt-body-ns] {
  z-index: 100580 !important;
  position: fixed !important;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
  box-sizing: border-box;
  overflow-x: hidden;
}

.picking-list-edit-page .twitter-typeahead {
  display: block !important;
  width: 100%;
  line-height: 1.42857143;
  vertical-align: top;
}

.picking-list-edit-page .twitter-typeahead .tt-input,
.picking-list-edit-page .pl-parent-typeahead.tt-input {
  width: 100% !important;
}

.picking-list-edit-page .tt-hint {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  position: absolute !important;
  clip: rect(0, 0, 0, 0) !important;
}

/* Supplier and item typeahead dropdowns — ensure visible below field */
.picking-list-edit-page .tt-menu,
.picking-list-edit-page .tt-dropdown-menu {
  z-index: 99999 !important;
  max-height: 300px;
  overflow-y: auto;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  margin-top: 2px;
}
.picking-list-edit-page .twitter-typeahead {
  position: relative;
}
.picking-list-edit-page .pl-item-card,
.picking-list-edit-page .mt-repeater-item {
  overflow: visible;
}
.picking-list-edit-page .pl-items-repeater .form-group {
  overflow: visible;
}

/* Edit / create hero */
.pl-edit-hero {
  background: linear-gradient(135deg, #1a3a52 0%, #2c5282 48%, #2b6cb0 100%);
  color: #fff;
  border-radius: 12px;
  padding: 28px 32px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(26, 58, 82, 0.22);
}

.pl-edit-hero-inner {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.pl-edit-hero-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}

.pl-edit-title {
  margin: 0 0 8px 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
}

.pl-edit-sub {
  margin: 0;
  font-size: 15px;
  opacity: 0.92;
  line-height: 1.5;
  max-width: 640px;
}

.pl-badge-num {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  padding: 4px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
}

.pl-loading-panel {
  text-align: center;
  padding: 48px 24px;
  background: #f8fafc;
  border-radius: 12px;
  margin-bottom: 20px;
  color: #64748b;
}

.pl-loading-panel .fa-spinner {
  color: #2c5282;
}

.pl-tip-banner {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 20px;
  background: linear-gradient(90deg, #ebf8ff 0%, #f0f9ff 100%);
  border: 1px solid #bee3f8;
  border-radius: 10px;
  margin-bottom: 22px;
  font-size: 14px;
  line-height: 1.55;
  color: #2c5282;
}

.pl-tip-banner > .fa {
  font-size: 22px;
  margin-top: 2px;
  opacity: 0.85;
}

.picking-list-edit-page .portlet.light.bordered {
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border-color: #e2e8f0 !important;
  margin-bottom: 20px;
  overflow: visible;
}
.picking-list-edit-page .portlet-body,
.picking-list-edit-page .form-body {
  overflow: visible;
}

.picking-list-edit-page .portlet-title {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 12px;
  margin-bottom: 4px;
}

.picking-list-edit-page .portlet-title .caption-subject {
  color: #2d3748;
}

/* Item rows as cards */
.pl-items-repeater .pl-item-card {
  background: #fafbfc;
  border: 1px solid #e8ecf1;
  border-radius: 10px;
  padding: 18px 18px 8px;
  margin-bottom: 16px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pl-items-repeater .pl-item-card:hover {
  border-color: #cbd5e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.pl-items-repeater .pl-item-card .form-group {
  margin-bottom: 12px;
}

.pl-items-repeater .pl-item-card .control-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #718096;
  font-weight: 600;
}

.pl-items-repeater [data-repeater-create] {
  margin-top: 8px;
  border-radius: 8px;
  padding: 10px 20px;
  font-weight: 600;
}

/* View page */
.picking-list-view .pl-view-hero {
  background: linear-gradient(135deg, #1e4a6d 0%, #2c7a7b 100%);
  color: #fff;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(30, 74, 109, 0.2);
}

.picking-list-view .pl-view-hero h3 {
  margin: 0 0 6px 0;
  font-size: 24px;
  font-weight: 600;
  color: #fff;
}

.picking-list-view .pl-view-hero .pl-view-meta {
  opacity: 0.9;
  font-size: 14px;
}

.picking-list-view .portlet.light.bordered {
  border-radius: 10px;
  border-color: #e2e8f0 !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.picking-list-view .progress-summary {
  border-radius: 10px;
  border: 1px solid #e8ecf1;
}

.picking-list-view .items-table table {
  border-radius: 8px;
  overflow: hidden;
}

.picking-list-view .items-table thead th {
  background: linear-gradient(180deg, #f7fafc 0%, #edf2f7 100%);
}

/* List page */
.picking-lists-page .pl-list-hero {
  margin-bottom: 20px;
}

.picking-lists-page .pl-list-hero h3 {
  font-size: 24px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 6px;
}

.picking-lists-page .pl-list-hero small {
  color: #718096;
  font-size: 15px;
}

.picking-lists-page .dashboard-stat {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.picking-lists-page .portlet.light.bordered {
  border-radius: 10px;
  border-color: #e2e8f0 !important;
}
