.ticket-status-select {
  position: relative;
  min-width: 0;
}

.ticket-status-select > select.status-picker-native {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.status-picker {
  position: relative;
  width: 100%;
}

.status-picker > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 9px 38px 9px 12px;
  border: 1px solid #cfd7e6;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #172033;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.status-picker > summary::-webkit-details-marker { display: none; }
.status-picker > summary::marker { content: ""; }

.status-picker > summary::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #667085;
  border-bottom: 2px solid #667085;
  transform: translateY(-65%) rotate(45deg);
  transition: transform .15s ease;
}

.status-picker[open] > summary {
  border-color: #528bff;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(82, 139, 255, .14), 0 8px 20px rgba(16, 24, 40, .08);
}

.status-picker[open] > summary::after {
  transform: translateY(-35%) rotate(225deg);
}

.status-picker-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 999px;
  background: #98a2b3;
  box-shadow: 0 0 0 4px #f2f4f7;
}

.status-picker-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 7px);
  left: 0;
  width: min(360px, calc(100vw - 40px));
  max-height: min(440px, 62vh);
  overflow-y: auto;
  padding: 7px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 40px rgba(16, 24, 40, .16), 0 2px 8px rgba(16, 24, 40, .08);
  backdrop-filter: blur(8px);
}

.status-picker-option {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 11px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  text-align: left;
  font-size: 12px;
  font-weight: 750;
}

.status-picker-option:not(:disabled):hover,
.status-picker-option:not(:disabled):focus-visible {
  outline: none;
  background: #f2f6ff;
  color: #1849a9;
}

.status-picker-option:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.status-picker-option[aria-selected="true"] {
  background: #eef4ff;
  color: #1849a9;
}

.status-picker-option[aria-selected="true"]::after {
  content: "✓";
  font-size: 14px;
  font-weight: 900;
}

.status-picker-option .status-picker-dot {
  width: 8px;
  height: 8px;
  flex-basis: 8px;
  box-shadow: none;
}

.status-picker-option + .status-picker-option { margin-top: 2px; }

.status-picker-option[data-status^="WARTET_"] { margin-top: 5px; }
.status-picker-option[data-status^="WARTET_"] + .status-picker-option[data-status^="WARTET_"] { margin-top: 2px; }
.status-picker-option[data-status="WARTET_AUF_DIENSTLEISTER"] { border-top: 1px solid #eaecf0; border-radius: 0 0 8px 8px; padding-top: 12px; }

.status-tone-blue .status-picker-dot,
.status-picker-option.status-tone-blue .status-picker-dot { background: #2e90fa; }
.status-tone-indigo .status-picker-dot,
.status-picker-option.status-tone-indigo .status-picker-dot { background: #6172f3; }
.status-tone-green .status-picker-dot,
.status-picker-option.status-tone-green .status-picker-dot { background: #12b76a; }
.status-tone-darkgreen .status-picker-dot,
.status-picker-option.status-tone-darkgreen .status-picker-dot { background: #067647; }
.status-tone-amber .status-picker-dot,
.status-picker-option.status-tone-amber .status-picker-dot { background: #f79009; }
.status-tone-red .status-picker-dot,
.status-picker-option.status-tone-red .status-picker-dot { background: #d92d20; }
.status-tone-gray .status-picker-dot,
.status-picker-option.status-tone-gray .status-picker-dot { background: #98a2b3; }

@media (max-width: 700px) {
  .status-picker-menu {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    width: auto;
    max-height: 70vh;
  }
}
