.stockify-picker {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
}

.stockify-picker > select.stockify-picker__native {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  clip-path: inset(50%);
  pointer-events: none;
}

.stockify-picker__trigger {
  display: flex;
  width: 100%;
  min-width: 0;
  min-height: var(--control-height, 46px);
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 9px 12px 9px 13px;
  border: 1px solid var(--control-border, #84968b);
  border-radius: var(--control-field-radius, 12px);
  background: var(--control-surface, #f7f9f7);
  color: var(--navy, #14202e);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.stockify-picker__value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stockify-picker__trigger::after {
  flex: none;
  width: 16px;
  height: 16px;
  background-color: var(--deep, #0b6b16);
  -webkit-mask: var(--control-select) center / contain no-repeat;
  mask: var(--control-select) center / contain no-repeat;
  content: "";
}

.stockify-picker__trigger[aria-expanded="true"],
.stockify-picker__trigger:not([aria-disabled="true"]):active {
  border-color: var(--control-focus, #0b6b16);
  background-color: var(--white, #fff);
}

.stockify-picker__trigger:focus-visible {
  outline: 2px solid var(--control-focus, #0b6b16);
  outline-offset: 2px;
}

.stockify-picker__trigger[aria-invalid="true"] {
  border-color: #943d39;
}

.stockify-picker__trigger[aria-disabled="true"] {
  opacity: .56;
  cursor: default;
}

.stockify-picker__error {
  display: block;
  margin-top: 6px;
  color: #943d39;
  font-size: .75rem;
  font-weight: 600;
}

.stockify-picker__popup {
  --picker-safe-top: env(safe-area-inset-top, 0px);
  --picker-safe-right: env(safe-area-inset-right, 0px);
  --picker-safe-bottom: env(safe-area-inset-bottom, 0px);
  --picker-safe-left: env(safe-area-inset-left, 0px);
  position: fixed;
  z-index: 100;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 5px;
  border: 1px solid #cbd7ce;
  border-radius: 14px;
  background: #fbfdfb;
  box-shadow: 0 12px 28px #14202e26, 0 2px 6px #14202e12;
  color: var(--navy, #14202e);
  font-size: .9rem;
  font-weight: 400;
  line-height: 1.35;
  scrollbar-width: none;
  touch-action: pan-y pinch-zoom;
}

.stockify-picker__popup::-webkit-scrollbar {
  display: none;
}

.stockify-picker__popup[data-side="above"] {
  --picker-rise: 3px;
  transform-origin: var(--picker-origin-x, left) bottom;
}

.stockify-picker__popup[data-side="below"] {
  --picker-rise: -3px;
  transform-origin: var(--picker-origin-x, left) top;
}

.stockify-picker__popup[data-alignment="end"] {
  --picker-origin-x: right;
}

.stockify-picker__group-label {
  display: block;
  padding: 8px 9px 4px 32px;
  color: var(--gray, #6b7280);
  font-size: .73rem;
  font-weight: 600;
}

.stockify-picker__option {
  display: grid;
  min-height: 40px;
  grid-template-columns: 15px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  border-radius: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.stockify-picker__option > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.stockify-picker__option::before {
  width: 15px;
  height: 15px;
  background-color: transparent;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 10.2 3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='black' stroke-width='2.15' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 10.2 3.5 3.5 7.5-8'/%3E%3C/svg%3E") center / contain no-repeat;
  content: "";
}

.stockify-picker__option[aria-selected="true"] {
  color: var(--deep, #0b6b16);
  font-weight: 600;
}

.stockify-picker__option[aria-selected="true"]::before {
  background-color: currentColor;
}

.stockify-picker__option[data-active],
.stockify-picker__option:not([aria-disabled="true"]):active {
  background: #e3f2e6;
}

.stockify-picker__option[aria-disabled="true"] {
  color: var(--gray, #6b7280);
  cursor: default;
}

@media (hover: hover) and (pointer: fine) {
  .stockify-picker__trigger:not([aria-disabled="true"]):hover {
    border-color: var(--control-focus, #0b6b16);
  }

  .stockify-picker__option:not([aria-disabled="true"]):hover {
    background: #e3f2e6;
  }
}

@media (pointer: coarse) {
  .stockify-picker__option {
    min-height: 46px;
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .stockify-picker__popup[data-pointer] {
    animation: stockify-picker-in 145ms var(--ease-out, cubic-bezier(.23, 1, .32, 1)) both;
  }

  @keyframes stockify-picker-in {
    from { opacity: .65; transform: translateY(var(--picker-rise, -3px)) scale(.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

@media (forced-colors: active) {
  .stockify-picker__trigger::after,
  .stockify-picker__option[aria-selected="true"]::before {
    background-color: CanvasText;
    forced-color-adjust: none;
  }

  .stockify-picker__option[data-active] {
    outline: 1px solid Highlight;
    outline-offset: -1px;
  }
}
