:host {
  display: block;
  width: 100%;
}

:host(.form-control),
:host(.form-select),
:host(.select-glass) {
  /* Reset Bootstrap field skin on host to avoid duplicate "field behind" effect. */
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  height: auto !important;
  min-height: 0 !important;
}

.app-select {
  position: relative;
  width: 100%;
}

.app-select-trigger {
  position: relative;
  width: 100%;
  height: 42px;
  border-radius: 10px;
  border: 1.5px solid rgba(15, 23, 42, 0.12);
  padding: 0 28px 0 12px;
  background: #fff;
  color: #0f172a;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

:host(.form-control) .app-select-trigger,
:host(.form-select) .app-select-trigger {
  border-radius: 8px;
  border: 1px solid rgba(17, 18, 20, 0.15);
  font-size: 0.9rem;
}

:host(.select-glass) .app-select-trigger {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(17, 18, 20, 0.15);
  border-radius: 12px;
  font-weight: 800;
}

:host(.select-glass) .app-select-trigger:hover {
  background: #fff;
  border-color: rgba(17, 18, 20, 0.7);
  box-shadow: 0 4px 12px rgba(3, 15, 170, 0.1);
}

.app-select.sm .app-select-trigger {
  height: 36px;
  font-size: 13px;
  padding-right: 24px;
}

.app-select-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


.app-select-trigger i {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  font-size: 12px;
}

.app-select.open .app-select-trigger {
  border-color: #e33dcf;
  box-shadow: 0 0 0 3px rgba(227, 61, 207, 0.15);
}

.app-select.disabled .app-select-trigger {
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}

.app-select-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  z-index: 1200;
  padding: 6px;
}

.app-select-search {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  padding: 6px 8px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 9px;
  background: #fff;

  i {
    color: #64748b;
    font-size: 12px;
  }
}

.app-select-search-input {
  flex: 1 1 auto;
  min-width: 0;
  border: none;
  background: transparent;
  outline: none;
  font-size: 12px;
  color: #0f172a;
  padding: 0;

  &::placeholder {
    color: #94a3b8;
  }
}

.app-select-search-clear {
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;

  &:hover {
    background: rgba(148, 163, 184, 0.2);
    color: #475569;
  }
}

.app-select-option {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.app-select-option:hover {
  background: rgba(227, 61, 207, 0.08);
}

.app-select-option.selected {
  background: rgba(227, 61, 207, 0.12);
  color: #b71fb0;
  font-weight: 600;
}

.app-select-empty {
  padding: 12px 10px;
  font-size: 12px;
  color: #94a3b8;
}
